diff --git a/src/main.rs b/src/main.rs index f4f3bdc..e4ecac4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,17 +17,17 @@ along with this program. If not, see . */ use axum::{ + Json, Router, extract::{Path, State}, http::HeaderMap, http::StatusCode, routing::get, routing::post, routing::put, - Json, Router, }; use serde::{Deserialize, Serialize}; -use serde_json::{json, Value}; -use sqlx::{postgres::PgPoolOptions, PgExecutor, PgPool}; +use serde_json::{Value, json}; +use sqlx::{PgExecutor, PgPool, postgres::PgPoolOptions}; use std::env; use std::time::{Duration, SystemTime, UNIX_EPOCH}; @@ -85,7 +85,7 @@ async fn main() { .route("/version", get(version)) .with_state(db_pool); - let mut bind_with = "127.0.0.1:".to_owned(); + let mut bind_with = "0.0.0.0:".to_owned(); bind_with += &listen_port; let listener = tokio::net::TcpListener::bind(bind_with).await.unwrap(); axum::serve(listener, app).await.unwrap();