Listen on all interfaces in dev
This commit is contained in:
parent
6d412cd511
commit
19f7cba75a
|
@ -166,7 +166,11 @@ async fn serve(posts: &[Post<HtmlContent>], pool: SqlitePool) {
|
||||||
.fallback(get_service(articles_or_fallback))
|
.fallback(get_service(articles_or_fallback))
|
||||||
.layer(Extension(pool));
|
.layer(Extension(pool));
|
||||||
|
|
||||||
let addr = SocketAddr::from(([127, 0, 0, 1], 8084));
|
let addr = if cfg!(debug_assertions) {
|
||||||
|
SocketAddr::from(([0, 0, 0, 0], 8084))
|
||||||
|
} else {
|
||||||
|
SocketAddr::from(([127, 0, 0, 1], 8084))
|
||||||
|
};
|
||||||
info!("Listening on {}", addr);
|
info!("Listening on {}", addr);
|
||||||
axum::Server::bind(&addr)
|
axum::Server::bind(&addr)
|
||||||
.serve(app.into_make_service())
|
.serve(app.into_make_service())
|
||||||
|
|
Loading…
Reference in New Issue