1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

simplify Application creation; update url dispatch guide section

This commit is contained in:
Nikolay Kim
2017-12-11 14:16:29 -08:00
parent caca907c23
commit 0f75d066f2
24 changed files with 512 additions and 207 deletions

View File

@ -57,7 +57,7 @@ fn main() {
let sys = actix::System::new("ws-example");
HttpServer::new(
Application::new("/")
Application::new()
// enable logger
.middleware(middlewares::Logger::default())
// cookie session middleware

View File

@ -60,7 +60,7 @@ fn main() {
let sys = actix::System::new("ws-example");
HttpServer::new(
Application::with_state("/", AppState{counter: Cell::new(0)})
Application::with_state(AppState{counter: Cell::new(0)})
// enable logger
.middleware(middlewares::Logger::default())
// websocket route

View File

@ -61,7 +61,7 @@ fn main() {
let sys = actix::System::new("ws-example");
HttpServer::new(
Application::new("/")
Application::new()
// enable logger
.middleware(middlewares::Logger::default())
// websocket route