#PORT error

2 messages · Page 1 of 1 (latest)

flat sand
#

First time user, trying to get a node.js project up. I keep getting the error 'PORT variable must be integer between 0 and 65535' -- I've just entered PORT into the variable tab, and also tried giving it an empty string value. The code for the listener in app.js is...
const PORT = process.env.PORT || 4000;
app.listen(PORT, () => console.log(Server running on port ${PORT}));

Any help would be appreciated!

lyric fulcrumBOT
#

Please provide your project ID or reply with N/A. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.