Set up project structure, backend stater files, and initial documentation
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "task-backend",
|
||||
"version": "1.0.0",
|
||||
"description": "Backend API for scalable task platform",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "node server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.21.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
const express = require("express");
|
||||
|
||||
const app = express();
|
||||
const PORT = 3000;
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
app.get("/", (req, res) => {
|
||||
res.send("Task backend is running");
|
||||
});
|
||||
|
||||
app.get("/health", (req, res) => {
|
||||
res.status(200).json({ status: "healthy" });
|
||||
});
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server running on port ${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user