No Open Ports Error

I keep getting this issue
No open ports detected, continuing to scan…
Docs on specifying a port: Web Services – Render Docs

and this is my code
import express from “express”;
import cors from “cors”;
import ninjas from “./routes/records.js”;

const PORT = process.env.PORT || 8080;
const app = express();

app.use(cors(origin: my origin));
app.use(express.json());
app.use(“/records”, ninjas);

app.listen(PORT, ‘0.0.0.0’, () =>{
console.log(Server is running on port ${PORT})
})

i also specified the port number in the environmental variables what is wrong

Hi there,

Are you still having this issue?

On face value, this code looks okay. How are you starting this service?

Regards,

Keith
Render Support, UTC+10 :australia:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.