1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

rename Application

This commit is contained in:
Nikolay Kim
2018-03-31 00:16:55 -07:00
parent 7a743fa6b5
commit 3ee228005d
51 changed files with 237 additions and 238 deletions

View File

@ -18,7 +18,7 @@ extern crate env_logger;
use actix::prelude::*;
use actix_web::{http, middleware,
Application, HttpServer, HttpRequest, HttpResponse, Error, AsyncResponder};
App, HttpServer, HttpRequest, HttpResponse, Error, AsyncResponder};
use diesel::prelude::*;
use futures::future::Future;
@ -63,7 +63,7 @@ fn main() {
// Start http server
let _addr = HttpServer::new(move || {
Application::with_state(State{db: addr.clone()})
App::with_state(State{db: addr.clone()})
// enable logger
.middleware(middleware::Logger::default())
.resource("/{name}", |r| r.method(http::Method::GET).a(index))})