server: remove port requirement, permit running on paths (#680)

This commit is contained in:
Scratch
2023-11-29 18:34:42 +11:00
committed by GitHub
parent 713b1d95c9
commit 9fabf414fe
3 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -96,8 +96,11 @@ const startWebServer = () => {
server.on('error', handleError);
server.on('listening', handleListening);
process.on('exit', () => {
server.close();
});
const address = chalk.underline(`${useSSL ? 'https' : 'http'}://${host}:${port}`);
const address = chalk.underline(typeof port === 'string' ? port : `${useSSL ? 'https' : 'http'}://${host}:${port}`);
console.log(chalk.green(`Flood server ${packageJSON.version} starting on ${address}\n`));