1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-08-01 10:15:05 +00:00
This commit is contained in:
Nikolay Kim 2017-11-29 14:22:47 -08:00
parent 991dd107b1
commit 27035c9454

View file

@ -43,7 +43,7 @@ request handler with the application's `resource` on a particular *HTTP method*
```rust,ignore ```rust,ignore
let app = Application::default("/") let app = Application::default("/")
.resource("/", |r| r.handler(Method::GET, index) .resource("/", |r| r.get(index))
.finish() .finish()
``` ```
@ -73,7 +73,7 @@ fn main() {
HttpServer::new( HttpServer::new(
Application::default("/") Application::default("/")
.resource("/", |r| r.handler(Method::GET, index))) .resource("/", |r| r.get(index)))
.serve::<_, ()>("127.0.0.1:8088").unwrap(); .serve::<_, ()>("127.0.0.1:8088").unwrap();
println!("Started http server: 127.0.0.1:8088"); println!("Started http server: 127.0.0.1:8088");