mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 13:51: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
|
```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");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user