package fr.alecharp.picshare;

import fr.alecharp.picshare.config.PicShareModule;
import fr.alecharp.picshare.http.EventController;
import net.codestory.http.WebServer;
import net.codestory.http.injection.GuiceAdapter;

/**
 * @author Adrien Lecharpentier
 */
public class App {
    public static void main(String[] args) {
        new WebServer()
            .configure(r -> r
                .setIocAdapter(new GuiceAdapter(new PicShareModule()))
                .get("/ping", "pong")
                .add(EventController.class)
            ).start(8080);
    }
}

@@ -24,16 +24,150 @@
 share;%0A%0A
+import com.google.inject.Guice;%0Aimport com.google.inject.Injector;%0Aimport com.google.inject.Key;%0Aimport com.google.inject.name.Names;%0A
 import f
@@ -209,16 +209,16 @@
 Module;%0A
-
 import f
@@ -347,16 +347,45 @@
 apter;%0A%0A
+import java.nio.file.Paths;%0A%0A
 /**%0A * @
@@ -532,18 +532,238 @@
 re(r -%3E 
-r%0A
+%7B%0A                Injector injector = Guice.createInjector(new PicShareModule());%0A                String storageLocation = injector.getInstance(Key.get(String.class, Names.named(%22storageLocation%22)));%0A                r%0A    
         
@@ -806,31 +806,22 @@
 ter(
-new PicShareModule()))%0A
+injector))%0A   
     
@@ -832,16 +832,17 @@
         
+ 
 .get(%22/p
@@ -855,16 +855,20 @@
 %22pong%22)%0A
+    
         
@@ -915,16 +915,121 @@
         
+        .bind(String.format(%22/%25s/%22, storageLocation), Paths.get(storageLocation).toFile());%0A            %7D
 ).start(

Configure server to serve picture directly