mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-05 13:57:39 +03:00
refactor middlewares
This commit is contained in:
parent
51cd08ef57
commit
40c1d3b711
12 changed files with 355 additions and 117 deletions
|
@ -49,8 +49,8 @@ fn main() {
|
|||
HttpServer::new(
|
||||
Application::default("/")
|
||||
// enable logger
|
||||
.middleware(Logger::new(None))
|
||||
// register simple handler, handle all methods
|
||||
.middleware(middlewares::Logger::new(None))
|
||||
// register simple handle r, handle all methods
|
||||
.handler("/index.html", index)
|
||||
// with path parameters
|
||||
.resource("/user/{name}/", |r| r.handler(Method::GET, with_param))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue