mirror of
https://github.com/actix/examples
synced 2025-06-28 18:00:37 +02:00
normalize ports to 8080
This commit is contained in:
@ -6,8 +6,9 @@ edition = "2021"
|
||||
[dependencies]
|
||||
actix-web = "4"
|
||||
|
||||
env_logger = "0.9.0"
|
||||
env_logger = "0.9"
|
||||
futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
|
||||
json = "0.12"
|
||||
log = "0.4"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
|
@ -58,8 +58,9 @@ async fn index_mjsonrust(body: web::Bytes) -> Result<HttpResponse, Error> {
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
std::env::set_var("RUST_LOG", "actix_web=info");
|
||||
env_logger::init();
|
||||
env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
|
||||
|
||||
log::info!("starting HTTP server at http://localhost:8080");
|
||||
|
||||
HttpServer::new(|| {
|
||||
App::new()
|
||||
|
Reference in New Issue
Block a user