fix: Make actix follow PORT envvar The server needs to follow `POST` envvar for heroku's sake.
diff --git a/src/bin/actix.rs b/src/bin/actix.rs index dd03ecea2991a37f05fa83202b0ca81f579a6ffb..c2f81fe8ad66d180d8a465ce05a53a92465f4b5a 100644 --- a/src/bin/actix.rs +++ b/src/bin/actix.rs @@ -23,12 +23,13 @@ #[actix_web::main] async fn main() -> std::io::Result<()> { + let port = env::var("PORT").unwrap_or("3000".into()).parse::<u16>().unwrap_or(3000); HttpServer::new(|| { App::new() .service(index) .service(posts) }) - .bind(("0.0.0.0", 3000))? + .bind(("0.0.0.0", port))? .run() .await }