Total Complexity | 2 |
Complexity/F | 2 |
Lines of Code | 18 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
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); |
||
|
|||
18 | }); |
||
19 |