Skip to content

Commit

Permalink
feat: added healthcheck awake
Browse files Browse the repository at this point in the history
  • Loading branch information
ghoshRitesh12 committed Aug 19, 2023
1 parent 028064e commit 25115e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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);

0 comments on commit 25115e2

Please sign in to comment.