Merge: nitweb: use ConsoleLog middleware
authorJean Privat <jean@pryen.org>
Mon, 6 Jun 2016 15:12:57 +0000 (11:12 -0400)
committerJean Privat <jean@pryen.org>
Mon, 6 Jun 2016 15:12:57 +0000 (11:12 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

Pull-Request: #2163
Reviewed-by: Jean Privat <jean@pryen.org>

1  2 
src/nitweb.nit

diff --cc src/nitweb.nit
@@@ -66,9 -49,11 +66,11 @@@ private class NitwebPhas
  
                var app = new App
  
+               app.use_before("/*", new RequestClock)
 -              app.use("/api", new APIRouter(model, modelbuilder, mainmodule))
 +              app.use("/api", new APIRouter(model, modelbuilder, mainmodule, catalog))
                app.use("/doc/:namespace", new DocAction(model, mainmodule, modelbuilder))
                app.use("/*", new StaticHandler(toolcontext.share_dir / "nitweb", "index.html"))
+               app.use_after("/*", new ConsoleLog)
  
                app.listen(host, port.to_i)
        end