add: server health endpoint
This commit is contained in:
4
index.js
4
index.js
@@ -2082,6 +2082,10 @@ app.get("/", async (req, res) => {
|
|||||||
return res.redirect("https://rasadyar.com");
|
return res.redirect("https://rasadyar.com");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.get("/health", async (req, res) => {
|
||||||
|
return res.json({ status: "server is working..." });
|
||||||
|
});
|
||||||
|
|
||||||
// Start the server
|
// Start the server
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.log(`Server is running on http://localhost:${port}`);
|
console.log(`Server is running on http://localhost:${port}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user