dev config for ngaccount server listener bind address

master
Niko PLP 10 months ago
parent 1dc048c153
commit 92eabc251e
  1. 12
      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(())
}

Loading…
Cancel
Save