feat: added healthcheck awake

This commit is contained in:
Ritesh Ghosh
2023-08-19 23:46:42 +05:30
parent 028064ea5d
commit 25115e2289
+7
View File
@@ -2,6 +2,7 @@ import morgan from "morgan";
import express from "express";
import { config } from "dotenv";
import http from "http";
import { resolve } from "path";
import { ratelimit } from "./config/ratelimit";
import errorHandler from "./config/errorHandler";
@@ -26,3 +27,9 @@ app.use(errorHandler);
app.listen(PORT, () => {
console.log(`⚔️ api @ http://localhost:${PORT}`);
});
// don't sleep
setInterval(() => {
console.log("HEALTHCHECK ;)", new Date().toLocaleString());
http.get("https://api-aniwatch.onrender.com/health");
}, 540000);