Fix open flag when using 0.0.0.0

This commit is contained in:
Asher 2019-07-16 19:23:58 -05:00
parent b6fdb7d0e7
commit db41f106bc
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -193,9 +193,11 @@ const main = async (): Promise<void> => {
console.log(" - Not serving HTTPS"); console.log(" - Not serving HTTPS");
} }
if (args["open"]) { if (!args.socket && args.open) {
await open(serverAddress).catch(console.error); // The web socket doesn't seem to work if using 0.0.0.0.
console.log(` - Opened ${serverAddress}`); const openAddress = `http://localhost:${port}`;
await open(openAddress).catch(console.error);
console.log(` - Opened ${openAddress}`);
} }
}; };