mirror of
https://github.com/actix/examples
synced 2025-06-27 01:27:43 +02:00
fix cors example
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user