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>

src/nitweb.nit

index 7eba23d..13e3dce 100644 (file)
@@ -66,9 +66,11 @@ private class NitwebPhase
 
                var app = new App
 
+               app.use_before("/*", new RequestClock)
                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