diff options
Diffstat (limited to 'server/src/main.rs')
-rw-r--r-- | server/src/main.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index d6467d5..f920013 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -61,7 +61,15 @@ async fn run() { let server = if let Some(l) = listenfd.take_tcp_listener(0).unwrap() { Server::from_tcp(l).unwrap() } else { - Server::bind(&([127, 0, 0, 1], 8080).into()) + Server::bind( + &( + [127, 0, 0, 1], + std::env::var("PORT") + .map(|p| p.parse().unwrap()) + .unwrap_or(8080), + ) + .into(), + ) }; let service = warp::service(routes); server |