mirror of
https://github.com/actix/actix-website
synced 2025-01-22 16:15:56 +01:00
Update main.rs
This commit is contained in:
parent
a0971bfa5c
commit
1c9ccd8078
@ -64,7 +64,7 @@ fn main() {
|
||||
|
||||
// Start http server
|
||||
HttpServer::new(move || {
|
||||
App::with_state(State { db: addr.clone() })
|
||||
App::new::data(State { db: addr.clone() })
|
||||
.resource("/{name}", |r| r.method(Method::GET).a(index))
|
||||
})
|
||||
.bind("127.0.0.1:8080")
|
||||
|
Loading…
x
Reference in New Issue
Block a user