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
|
|
|
|
2020-09-12 17:49:45 +02:00
|
|
|
#[actix_web::main]
|
2019-12-07 18:59:24 +01:00
|
|
|
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-25 17:48:33 +01:00
|
|
|
.run()
|
2019-12-07 18:59:24 +01:00
|
|
|
.await
|
2019-04-14 19:34:41 +02:00
|
|
|
}
|