1
0
mirror of https://github.com/actix/examples synced 2024-12-02 18:02:22 +01:00
examples/async_ex2/src/bin/main.rs

19 lines
400 B
Rust
Raw Normal View History

2019-04-09 20:12:07 +02:00
use actix_web::{middleware, App, HttpServer};
use async_ex2::{
appconfig::config_app,
};
fn main() -> std::io::Result<()> {
std::env::set_var("RUST_LOG", "actix_server=info,actix_web=info");
env_logger::init();
HttpServer::new(||
App::new()
.configure(config_app)
.wrap(middleware::Logger::default())
)
.bind("127.0.0.1:8080")?
.run()
}