mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 05:41:50 +01:00
fixes
This commit is contained in:
parent
991dd107b1
commit
27035c9454
@ -43,7 +43,7 @@ request handler with the application's `resource` on a particular *HTTP method*
|
||||
|
||||
```rust,ignore
|
||||
let app = Application::default("/")
|
||||
.resource("/", |r| r.handler(Method::GET, index)
|
||||
.resource("/", |r| r.get(index))
|
||||
.finish()
|
||||
```
|
||||
|
||||
@ -73,7 +73,7 @@ fn main() {
|
||||
|
||||
HttpServer::new(
|
||||
Application::default("/")
|
||||
.resource("/", |r| r.handler(Method::GET, index)))
|
||||
.resource("/", |r| r.get(index)))
|
||||
.serve::<_, ()>("127.0.0.1:8088").unwrap();
|
||||
|
||||
println!("Started http server: 127.0.0.1:8088");
|
||||
|
Loading…
x
Reference in New Issue
Block a user