8000 fix PORT env don't work · sorrycc/roadhog@4a619f5 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 4a619f5

Browse files
committed
fix PORT env don't work
1 parent 2798d6a commit 4a619f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const config = require('../config/webpack.config.dev');
1616
const paths = require('../config/paths');
1717
const getConfig = require('../utils/getConfig');
1818

19-
const DEFAULT_PORT = process.env.PORT || 8000;
19+
const DEFAULT_PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 8000;
2020
const isInteractive = process.stdout.isTTY;
2121
let compiler;
2222

@@ -108,7 +108,7 @@ function runDevServer(host, port, protocol) {
108108
},
109109
https: protocol === 'https',
110110
host: host,
111-
proxy: getConfig().proxy,
111+
proxy: getConfig(process.env.NODE_ENV).proxy,
112112
});
113113

114114
addMiddleware(devServer);

0 commit comments

Comments
 (0)
0