Skip to content

Commit

Permalink
default address to 0.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
caipira113 committed Jul 18, 2023
1 parent 7513a36 commit c5f53c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# verstream

## Environment
`ADDRESS` - Server address (default: 127.0.0.1)
`ADDRESS` - Server address (default: 0.0.0.0)
<br>
`PORT` - Server port (default: 8080)
<br>
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ fn check_env_var(var_name: &str) {

fn get_bind_address() -> IpAddr {
let bind_address = env::var("ADDRESS")
.unwrap_or_else(|_| String::from("127.0.0.1"));
.unwrap_or_else(|_| String::from("0.0.0.0"));

IpAddr::from_str(&bind_address)
.unwrap_or_else(|_| IpAddr::from_str("127.0.0.1").unwrap())
.unwrap_or_else(|_| IpAddr::from_str("0.0.0.0").unwrap())
}

async fn get_object(client: &Client, opt: Opt) -> Result<GetObjectOutput, anyhow::Error> {
Expand Down

0 comments on commit c5f53c4

Please sign in to comment.