1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

fix cors example

This commit is contained in:
Rob Ede
2022-03-15 17:32:27 +00:00
parent ba7812fb0a
commit c9ebeacf58
4 changed files with 96 additions and 83 deletions

View File

@ -5,8 +5,7 @@ mod user;
#[actix_web::main]
async fn main() -> std::io::Result<()> {
std::env::set_var("RUST_LOG", "actix=info");
env_logger::init();
env_logger::init_from_env(env_logger::Env::default().default_filter_or("info"));
HttpServer::new(move || {
App::new()
@ -22,7 +21,7 @@ async fn main() -> std::io::Result<()> {
.wrap(Logger::default())
.service(user::info)
})
.bind(("127.0.0.1", 8000))?
.bind(("127.0.0.1", 8080))?
.run()
.await
}