fix: add port fallback (#23)
Add fallback to port 3000, if PORT in env is not defined
This commit is contained in:
parent
38d1c3b9f6
commit
b4dbd8ce86
@ -28,6 +28,6 @@ app.get("/api/hello", function (req, res) {
|
||||
|
||||
|
||||
// listen for requests :)
|
||||
var listener = app.listen(process.env.PORT, function () {
|
||||
var listener = app.listen(process.env.PORT || 3000, function () {
|
||||
console.log('Your app is listening on port ' + listener.address().port);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user