mirror of
https://github.com/actix/examples
synced 2025-06-29 10:14:58 +02:00
added async_ex2
This commit is contained in:
19
async_ex2/src/bin/main.rs
Normal file
19
async_ex2/src/bin/main.rs
Normal 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()
|
||||
}
|
Reference in New Issue
Block a user