I’m deploying a simple Node.js Express app on Render.
I’m using the following to start the server:
app.listen(process.env.PORT, '0.0.0.0', () => {
console.log(`Server running`);
});
Everything seems correctly set:
PORT
is read fromprocess.env.PORT
- All required environment variables are added in the Render dashboard
start
script inpackage.json
is:
"start": "node index.js"
- Deployment logs show the server is starting without errors
However, after redeploying, I get a 502 Bad Gateway
error when accessing the service.
Is there anything else I should check specific to Render’s platform?
Thanks in advance.