Skip to content

Commit

Permalink
Merge pull request #2 from paul-mai/feature1
Browse files Browse the repository at this point in the history
Update main.rs
  • Loading branch information
ppardus committed Aug 18, 2023
2 parents d8053a7 + d2699d6 commit 9d7abe3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cstudio-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ async fn main() {

let port = std::env::var("PORT")
.unwrap_or_else(|_| String::from("3030"))
.parse().expect("Unable to parse PORT");
.parse().
expect("Unable to parse PORT");

let config = ServerConfig {
expiry_days: std::env::var("EXPIRY_DAYS")
.unwrap_or_else(|_| String::from("1"))
.parse().expect("Unable to parse EXPIRY_DAYS"),
.parse()
.expect("Unable to parse EXPIRY_DAYS"),
};

warp::serve(server(config)).run(([0, 0, 0, 0], port)).await;
Expand Down

0 comments on commit 9d7abe3

Please sign in to comment.