Fix class method bind. Await open promise

a20928b02c635d8ad38f0693bc5291f1ba437a4f

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -3Showing whitespace changes
server.js+3 -3
@@ -327,10 +327,10 @@ async function preSetupTasks() {
327async function postSetupTasks(result) {327async function postSetupTasks(result) {
328 const autorunHostname = await cliArgs.getAutorunHostname(result);328 const autorunHostname = await cliArgs.getAutorunHostname(result);
329 const autorunUrl = cliArgs.getAutorunUrl(autorunHostname);329 const autorunUrl = cliArgs.getAutorunUrl(autorunHostname);
330 console.log('Launching...');
331330
332 if (cliArgs.autorun) {331 if (cliArgs.autorun) {
333 open(autorunUrl.toString());332 console.log('Launching in a browser...');
333 await open(autorunUrl.toString());
334 }334 }
335335
336 setWindowTitle('SillyTavern WebServer');336 setWindowTitle('SillyTavern WebServer');
@@ -457,5 +457,5 @@ initUserStorage(globalThis.DATA_ROOT)
457 .then(verifySecuritySettings)457 .then(verifySecuritySettings)
458 .then(preSetupTasks)458 .then(preSetupTasks)
459 .then(apply404Middleware)459 .then(apply404Middleware)
460 .then(new ServerStartup(app, cliArgs).start)460 .then(() => new ServerStartup(app, cliArgs).start())
461 .then(postSetupTasks);461 .then(postSetupTasks);