Start from scratch with a new simulation #1

Merged
max merged 31 commits from restart into main 2025-04-25 15:03:09 +02:00
Showing only changes of commit d715aa47b3 - Show all commits

View File

@ -1,3 +1,5 @@
use std::env;
use axum::{
extract::Json,
response,
@ -30,7 +32,8 @@ async fn main() {
.route("/end", post(end));
debug!("Creating listener");
let listener = TcpListener::bind("0.0.0.0:8000").await.unwrap();
let port = env::var("PORT").unwrap_or_else(|_| "8000".into());
let listener = TcpListener::bind(format!("0.0.0.0:{port}")).await.unwrap();
debug!("Starting server");
axum::serve(listener, app).await.unwrap();
}