listen requires a number, `URL` port is string wtf

This commit is contained in:
RealBeepMcJeep 2023-08-30 11:32:13 -07:00
parent 113ea1d0ec
commit 3feeaaa09f
1 changed files with 5 additions and 4 deletions

View File

@ -4053,23 +4053,24 @@ if (listen && !config.whitelistMode && !config.basicAuthMode) {
}
}
if (true === cliArguments.ssl)
if (true === cliArguments.ssl) {
https.createServer(
{
cert: fs.readFileSync(cliArguments.certPath),
key: fs.readFileSync(cliArguments.keyPath)
}, app)
.listen(
tavernUrl.port || 443,
Number(tavernUrl.port) || 443,
tavernUrl.hostname,
setupTasks
);
else
} else {
http.createServer(app).listen(
tavernUrl.port || 80,
Number(tavernUrl.port) || 80,
tavernUrl.hostname,
setupTasks
);
}
async function convertWebp() {
const files = fs.readdirSync(directories.characters).filter(e => e.endsWith(".webp"));