fix: add default listen port for server (#235)
* Add default listen port * revise listener as requested * Revised listener as requested Added a space to console log
This commit is contained in:
parent
78ab54d63e
commit
909d5f12d5
@ -53,7 +53,8 @@ app.use(function(err, req, res, next) {
|
||||
}
|
||||
})
|
||||
|
||||
app.listen(process.env.PORT, function () {
|
||||
console.log('Node.js listening ...');
|
||||
//Listen on port set in environment variable or default to 3000
|
||||
const listener = app.listen(process.env.PORT || 3000, function () {
|
||||
console.log("Node.js listening on port " + listener.address().port);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user