From 92eabc251e8fdf34a446f6f089b5144d8bfab82a Mon Sep 17 00:00:00 2001 From: Niko PLP Date: Mon, 7 Aug 2023 02:04:07 +0300 Subject: [PATCH] dev config for ngaccount server listener bind address --- ngaccount/src/main.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ngaccount/src/main.rs b/ngaccount/src/main.rs index 7f57f2d..c7094f0 100644 --- a/ngaccount/src/main.rs +++ b/ngaccount/src/main.rs @@ -264,16 +264,20 @@ async fn main() -> anyhow::Result<()> { { let origin = format!("https://{}", domain); cors = cors.allow_origin(origin.as_str()); + log::info!("Starting server on http://localhost:3031"); + warp::serve(api_v1.or(static_files).with(cors)) + .run(([127, 0, 0, 1], 3031)) + .await; } #[cfg(debug_assertions)] { log_debug!("CORS: any origin"); cors = cors.allow_any_origin(); + log::info!("Starting server on http://192.168.192.2:3031"); + warp::serve(api_v1.or(static_files).with(cors)) + .run(([192, 168, 192, 2], 3031)) + .await; } - log::info!("Starting server on http://localhost:3031"); - warp::serve(api_v1.or(static_files).with(cors)) - .run(([192, 168, 192, 2], 3031)) - .await; Ok(()) }