uptime-kuma/extra/push-examples/javascript-fetch/index.js

12 lines
264 B
JavaScript
Raw Normal View History

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