mirror of
https://github.com/actix/actix-web.git
synced 2024-12-19 06:36:36 +00:00
fixes
This commit is contained in:
parent
991dd107b1
commit
27035c9454
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue