1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-02 01:31:57 +02:00

http server accepts factory of HttpHandlers

This commit is contained in:
Nikolay Kim
2017-12-12 07:40:36 -08:00
parent b9da09ddf0
commit e9aa67b75d
9 changed files with 34 additions and 31 deletions

View File

@@ -81,7 +81,7 @@ fn main() {
let sys = actix::System::new("example");
HttpServer::new(
Application::new()
|| Application::new()
.resource("/", |r| r.method(Method::GET).f(index)))
.serve::<_, ()>("127.0.0.1:8088").unwrap();