Webserver keeps returning 502
theoriginalhats
FREEOP

2 months ago

I've been trying to start a webserver for a couple hours now but it keeps returning a 502 error. need help with this. here is my test code:

const express = require("express");
const app = express();

const PORT = process.env.PORT || 8080;

app.get("/", (req, res) => {
  res.send("Server is running!");
});

app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});

and my start cmd is node src/index.js i dont get any build/ deployment errors .

Solved

4 Replies

theoriginalhats
FREEOP

2 months ago

i juat fixed it


theoriginalhats
FREEOP

2 months ago

oml


theoriginalhats
FREEOP

2 months ago

for future references i set my domain port different from what its supposed to listen for so it just returned 502


theoriginalhats
FREEOP

2 months ago

you can set this to solved


Status changed to Solved brody 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...