UNPKG

poll-server-check

Version:

An npm package that checks if the server is running or if it's down. If the server is down, it repeatedly sends a check API to the backend to wake it up and displays toast notification of the current status.

8 lines (6 loc) 173 B
function serverCheck(app) { app.post("/check", async (req, res) => { res.status(200).json({ msg: "Server is running" }); }); } module.exports = serverCheck;