Skip to content

Commit

Permalink
Update main to bind to 0.0.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkbyers committed Mar 31, 2024
1 parent e587c93 commit 17a1deb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use zero2prod::{configuration::get_configuration, startup::run};
async fn main() -> Result<(), std::io::Error> {
let config =
get_configuration(Some("configuration.yaml")).expect("Failed to read configuration.");
let address = format!("127.0.0.1:{}", config.application_port);
let address = format!("0.0.0.0:{}", config.application_port);
let listener = TcpListener::bind(address)?;
let db_path = config.database.local_file_path;
run(listener, &db_path).await?.await
Expand Down
2 changes: 1 addition & 1 deletion src/models/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ CREATE TABLE IF NOT EXISTS jobs (
status INTEGER NOT NULL,
created_at timestampz NOT NULL,
updated_at timestampz NOT NULL,
completed_at timestampz,
completed_at timestampz
);
"#;

0 comments on commit 17a1deb

Please sign in to comment.