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

@ -3,7 +3,7 @@ import { readFile, writeFile } from 'fs/promises';
import { parse as parseSetCookie, splitCookiesString } from 'set-cookie-parser';
const WRITE_INTERVAL = 60000,
cookiePath = process.env.cookiePath,
cookiePath = process.env.COOKIE_PATH,
COUNTER = Symbol('counter');
let cookies = {}, dirty = false, intervalId;