Skip to content

Commit 21a71ba

Browse files
committed
user port from env if available
1 parent 97f3c5a commit 21a71ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,14 @@ function start_server(cb) {
219219

220220
if (server_data && server_data.port) {
221221
port = server_data.port;
222+
} else if (process.env.PORT) {
223+
port = process.env.PORT
222224
} else {
223225
port = config.editor.port;
224226
}
225227

228+
229+
226230
winston.info('listening on port ' + port);
227231
cb(app.listen(port));
228232
});

0 commit comments

Comments
 (0)