dotenv config in dbgate-serve

This commit is contained in:
Jan Prochazka
2022-03-13 17:14:04 +01:00
parent 25015f35d5
commit b6cc77c7fe
4 changed files with 23 additions and 6 deletions

View File

@@ -95,7 +95,12 @@ function start() {
if (platformInfo.isNpmDist) {
app.use(getExpressPath('/'), express.static(path.join(__dirname, '../../dbgate-web/public')));
getPort({ port: 5000 }).then(port => {
getPort({
port: parseInt(
// @ts-ignore
process.env.PORT || 3000
),
}).then(port => {
server.listen(port, () => {
console.log(`DbGate API listening on port ${port}`);
});