what is process.env.PORT || 3000
used for in Node.js? I saw this somewhere:
app.set('port', process.env.PORT || 3000);
If it is used to set 3000
as the listening port, can I use this instead?
app.listen(3000);
If not why?
what is process.env.PORT || 3000
used for in Node.js? I saw this somewhere:
app.set('port', process.env.PORT || 3000);
If it is used to set 3000
as the listening port, can I use this instead?
app.listen(3000);
If not why?