mirror of
https://github.com/actix/actix-extras.git
synced 2025-06-25 09:59:21 +02:00
simplify Application creation; update url dispatch guide section
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user