1
0
mirror of https://github.com/actix/examples synced 2025-06-29 10:14:58 +02:00

added async_ex2

This commit is contained in:
dowwie
2019-04-09 14:12:07 -04:00
parent 4b62438e05
commit d29f113ffc
11 changed files with 167 additions and 0 deletions

19
async_ex2/src/bin/main.rs Normal file
View File

@ -0,0 +1,19 @@
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()
}