1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00

update readme example

This commit is contained in:
Nikolay Kim 2017-12-11 15:57:37 -08:00
parent 96381f5d6a
commit b1ae7f95cc

View File

@ -11,7 +11,7 @@ fn index(req: HttpRequest) -> String {
fn main() { fn main() {
HttpServer::new( HttpServer::new(
Application::new("/") Application::new()
.resource("/{name}", |r| r.method(Method::GET).f(index))) .resource("/{name}", |r| r.method(Method::GET).f(index)))
.serve::<_, ()>("127.0.0.1:8080"); .serve::<_, ()>("127.0.0.1:8080");
} }