Fix web server bind to 0.0.0.0 for external access
This commit is contained in:
@@ -298,10 +298,10 @@ pub async fn run(port: u16, file: Option<String>) -> anyhow::Result<()> {
|
|||||||
.layer(DefaultBodyLimit::disable())
|
.layer(DefaultBodyLimit::disable())
|
||||||
.with_state(state);
|
.with_state(state);
|
||||||
|
|
||||||
let addr = format!("127.0.0.1:{port}");
|
let addr = format!("0.0.0.0:{port}");
|
||||||
println!("📺 MarkBase ready on http://{addr}/");
|
println!("📺 MarkBase ready on http://{addr}/");
|
||||||
std::process::Command::new("open")
|
std::process::Command::new("open")
|
||||||
.arg(format!("http://{addr}/"))
|
.arg(format!("http://127.0.0.1:{port}/"))
|
||||||
.spawn()
|
.spawn()
|
||||||
.ok();
|
.ok();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user