1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-02 17:24:39 +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

@ -5,9 +5,7 @@ extern crate env_logger;
extern crate tera;
use actix_web::{
http, error, middleware, server,
Application, HttpRequest, HttpResponse, Error,
};
http, error, middleware, server, App, HttpRequest, HttpResponse, Error};
struct State {
@ -38,7 +36,7 @@ fn main() {
let _ = server::new(|| {
let tera = compile_templates!(concat!(env!("CARGO_MANIFEST_DIR"), "/templates/**/*"));
Application::with_state(State{template: tera})
App::with_state(State{template: tera})
// enable logger
.middleware(middleware::Logger::default())
.resource("/", |r| r.method(http::Method::GET).f(index))})