feat: added healthcheck awake
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user