env: readable environment variables in all files

apiPort -> API_PORT
apiURL -> API_URL
apiName -> API_NAME
cors -> ENABLE_CORS
cookiePath -> COOKIE_PATH

webPort -> WEB_PORT
webURL -> WEB_URL
showSponsors -> SHOW_SPONSORS
isBeta -> IS_BETA
This commit is contained in:
wukko
2024-03-05 19:08:59 +06:00
parent 8d8b04dd1f
commit e16ee6c1d3
8 changed files with 35 additions and 35 deletions

View File

@@ -76,12 +76,12 @@ export async function runWeb(express, app, gitCommit, gitBranch, __dirname) {
return res.redirect('/')
});
app.listen(process.env.webPort || 9001, () => {
app.listen(process.env.WEB_PORT || 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 || 9001}\n`
`URL: ${Cyan(`${process.env.WEB_URL}`)}\n` +
`Port: ${process.env.WEB_PORT || 9001}\n`
)
})
}