1 | const app = require('./index'); |
||
2 | |||
3 | // get env variable DBWEBB_PORT |
||
4 | var PORT; |
||
5 | |||
6 | if (typeof process.env.DBWEBB_PORT !== 'undefined') { |
||
7 | PORT = process.env.DBWEBB_PORT; |
||
8 | } else { |
||
9 | PORT = 1337; //use for production (after build) |
||
10 | //PORT = 1339; // use for development (npm run start-dev) |
||
11 | } |
||
12 | |||
13 | // Start up server |
||
14 | |||
15 | app.listen(process.env.PORT || PORT, () => { |
||
16 | // app.listen(PORT, () => { |
||
17 | console.log("Express is listening on port " + PORT); |
||
0 ignored issues
–
show
Debugging Code
introduced
by
![]() |
|||
18 | }); |
||
19 |