13 lines
298 B
JavaScript
Raw Normal View History

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