diff options
| author | Fuwn <[email protected]> | 2024-07-24 00:24:25 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-07-24 00:24:25 +0000 |
| commit | 28fbcfdeb2e93fbf3dc20731d3ef995935964637 (patch) | |
| tree | 3c32097cd572ab894f9e5bdb49343fd14a95a033 /src/main.rs | |
| parent | fix(response): remove hard path fixer (diff) | |
| download | september-28fbcfdeb2e93fbf3dc20731d3ef995935964637.tar.xz september-28fbcfdeb2e93fbf3dc20731d3ef995935964637.zip | |
chore: remove semi-outdated technical information
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/main.rs b/src/main.rs index fd24088..9fe7910 100644 --- a/src/main.rs +++ b/src/main.rs @@ -14,34 +14,24 @@ mod html; mod response; mod url; -#[macro_use] extern crate log; +#[macro_use] +extern crate log; use {actix_web::web, response::default, std::env::var}; #[actix_web::main] async fn main() -> std::io::Result<()> { - // Set the `RUST_LOG` environment variable so Actix can provide logs. - // - // This can be overridden using the `RUST_LOG` environment variable in - // configuration. std::env::set_var("RUST_LOG", "actix_web=info"); - - // Initialise `dotenv` so we can access `.env` files. dotenv::dotenv().ok(); - // Initialise logger so we can see logs pretty_env_logger::init(); - // Setup Actix web-server actix_web::HttpServer::new(move || { actix_web::App::new() .default_service(web::get().to(default)) .wrap(actix_web::middleware::Logger::default()) }) .bind(( - // Bind Actix web-server to localhost "0.0.0.0", - // If the `PORT` environment variable is present, try to use it, otherwise; - // use port `80`. var("PORT").map_or(80, |port| match port.parse::<_>() { Ok(port) => port, Err(e) => { |