未验证 提交 db41f106 编写于 作者: A Asher

Fix open flag when using 0.0.0.0

上级 b6fdb7d0
......@@ -193,9 +193,11 @@ const main = async (): Promise<void> => {
console.log(" - Not serving HTTPS");
}
if (args["open"]) {
await open(serverAddress).catch(console.error);
console.log(` - Opened ${serverAddress}`);
if (!args.socket && args.open) {
// The web socket doesn't seem to work if using 0.0.0.0.
const openAddress = `http://localhost:${port}`;
await open(openAddress).catch(console.error);
console.log(` - Opened ${openAddress}`);
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册