uptime-kuma/extra/push-examples/typescript-fetch/index.ts

12 lines
292 B
TypeScript
Raw Normal View History

// Supports: Deno, Bun, Node.js >= 18 (ts-node)
2023-09-13 08:03:12 -04:00
const pushURL : string = "https://example.com/api/push/key?status=up&msg=OK&ping=";
const interval : number = 60;
const push = async () => {
await fetch(pushURL);
console.log("Pushed!");
};
push();
setInterval(push, interval * 1000);