docker-blank / index.js
FadeClip's picture
initialize Express application with CORS support and Docker setup
d9564b5
raw
history blame contribute delete
395 Bytes
const express = require("express");
const cors = require("cors");
const app = express();
const port = 7860; // Or any port you prefer
// Enable CORS for all origins
app.use(cors());
// A simple route
app.get("/", (req, res) => {
res.json({ message: "Hello from Express with CORS enabled!" });
});
app.listen(port, () => {
console.log(`Server listening at http://localhost:${port}`);
});