refactor logger middleware

This commit is contained in:
Nikolay Kim 2017-11-10 12:29:54 -08:00
parent 657efb8cce
commit 265628750c
11 changed files with 192 additions and 154 deletions

View file

@ -134,7 +134,7 @@ fn main() {
HttpServer::new(
Application::default("/")
// enable logger
.middleware(middlewares::Logger::new(None))
.middleware(middlewares::Logger::default())
// websocket route
.resource("/ws/", |r| r.get::<MyWebSocket>())
.route_handler("/", StaticFiles::new("examples/static/", true)))