From 17a1deb65b9df3b4dd8bfa64f8e1845c4ef73c30 Mon Sep 17 00:00:00 2001 From: kirkbyers Date: Sun, 31 Mar 2024 15:57:33 -0500 Subject: [PATCH] Update main to bind to 0.0.0.0. --- src/main.rs | 2 +- src/models/jobs.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index fbcc4fa..2574523 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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 diff --git a/src/models/jobs.rs b/src/models/jobs.rs index 542e46b..e7fdfe4 100644 --- a/src/models/jobs.rs +++ b/src/models/jobs.rs @@ -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 ); "#; \ No newline at end of file