Skip to content

Commit cd49cee

Browse files
committed
Initialize backend
1 parent 1ebd2fa commit cd49cee

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

chat-app/backend/server.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const express = require("express");
2+
const cors = require("cors");
3+
4+
const app = express();
5+
6+
app.use(cors());
7+
app.use(express.json());
8+
9+
app.get("/health", (req, res) => {
10+
res.json({ status: "ok" });
11+
});
12+
13+
const PORT = 3000;
14+
15+
app.listen(PORT, () => {
16+
console.log(`Server running on port ${PORT}`);
17+
});

0 commit comments

Comments
 (0)