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 .
4 Replies
for future references i set my domain port different from what its supposed to listen for so it just returned 502
Status changed to Solved brody • 2 months ago