Skip to content

Commit 370db68

Browse files
committed
Added dinamic server port for node server
1 parent a72efb5 commit 370db68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ localhost.get(/.*/, function (req, res) {
2323
res.sendFile(__dirname + mainFile);
2424
});
2525

26-
localhost.listen(localhostPort, function () {
27-
console.log("Start surfing at localhost:%d", localhostPort);
26+
localhost.listen(process.env.PORT || localhostPort, function () {
27+
console.log("Start surfing at localhost:%d", (process.env.PORT || localhostPort));
2828
});

0 commit comments

Comments
 (0)