|
@@ -43,6 +43,7 @@ async fn main() {
|
|
|
info!("Successfully loaded client");
|
|
|
|
|
|
let base_path = std::env::var("BASE_PATH").expect("base path not configured");
|
|
|
+ let port = std::env::var("PORT").unwrap_or(String::from("3001"));
|
|
|
|
|
|
let mut env = Environment::new();
|
|
|
|
|
@@ -68,7 +69,9 @@ async fn main() {
|
|
|
|
|
|
let router_static = Router::new().fallback(get_service(ServeDir::new("assets")));
|
|
|
|
|
|
- let listener = tokio::net::TcpListener::bind("0.0.0.0:3001").await.unwrap();
|
|
|
+ let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{port}"))
|
|
|
+ .await
|
|
|
+ .unwrap();
|
|
|
|
|
|
axum::serve(listener, router.merge(router_static))
|
|
|
.await
|