2019-04-09 20:12:07 +02:00
|
|
|
use actix_web::{middleware, App, HttpServer};
|
|
|
|
|
2019-04-14 19:34:41 +02:00
|
|
|
use async_ex2::appconfig::config_app;
|
2019-04-09 20:12:07 +02:00
|
|
|
|
2019-12-07 18:59:24 +01:00
|
|
|
#[actix_rt::main]
|
|
|
|
async fn main() -> std::io::Result<()> {
|
2019-04-09 20:12:07 +02:00
|
|
|
std::env::set_var("RUST_LOG", "actix_server=info,actix_web=info");
|
|
|
|
env_logger::init();
|
|
|
|
|
2019-04-14 19:34:41 +02:00
|
|
|
HttpServer::new(|| {
|
2019-04-09 20:12:07 +02:00
|
|
|
App::new()
|
|
|
|
.configure(config_app)
|
|
|
|
.wrap(middleware::Logger::default())
|
2019-04-14 19:34:41 +02:00
|
|
|
})
|
2019-04-09 20:12:07 +02:00
|
|
|
.bind("127.0.0.1:8080")?
|
2019-12-07 18:59:24 +01:00
|
|
|
.start()
|
|
|
|
.await
|
2019-04-14 19:34:41 +02:00
|
|
|
}
|