We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 80e74f6 commit 5cc5146Copy full SHA for 5cc5146
1 file changed
Back-end/app.js
@@ -65,8 +65,13 @@ app.use(cors(corsOptions));
65
app.use("/api/v1/user", userRoute);
66
app.use("/api/v1/chat", chatRoute);
67
app.use("/api/v1/admin", adminRoute);
68
-app.use("/api/v1/health", (req, res) => {
69
- res.status(200).json({ status: "success", message: "API is healthy" });
+app.get("/api/v1/health", (req, res) => {
+ res.status(200).json({
70
+ status: "ok",
71
+ uptime: process.uptime(),
72
+ timestamp: new Date().toISOString(),
73
+ environment: process.env.NODE_ENV || "PRODUCTION",
74
+ });
75
});
76
77
app.get("/", (req, res) => {
0 commit comments