api & web: ports in env are no longer strictly required

This commit is contained in:
wukko
2023-12-02 22:01:58 +06:00
parent 3e8c059a3a
commit afab7f94a7
4 changed files with 13 additions and 11 deletions

View File

@@ -76,12 +76,12 @@ export async function runWeb(express, app, gitCommit, gitBranch, __dirname) {
return res.redirect('/')
});
app.listen(process.env.webPort, () => {
app.listen(process.env.webPort || 9001, () => {
console.log(`\n` +
`${Cyan("cobalt")} WEB ${Bright(`v.${version}-${gitCommit} (${gitBranch})`)}\n` +
`Start time: ${Bright(`${startTime.toUTCString()} (${startTimestamp})`)}\n\n` +
`URL: ${Cyan(`${process.env.webURL}`)}\n` +
`Port: ${process.env.webPort}\n`
`Port: ${process.env.webPort || 9001}\n`
)
})
}