diff --git a/src/ntfy.js b/src/ntfy.js new file mode 100644 index 0000000..ece1849 --- /dev/null +++ b/src/ntfy.js @@ -0,0 +1,27 @@ +import dotenv from 'dotenv'; +dotenv.config(); + +let ntfyUrl = process.env.NTFY_URL; + +export function sendNtfyOpen() { + let message = "Hackeriet is Open" + fetch(ntfyUrl,{ + method: "POST", + headers: { + "Content-Type": "application/json", + }, + + body: message + },) +} + +export function sendNtfyClosed() { + let message = "Hackeriet is Closed" + fetch( ntfyUrl,{ + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: message + },) +}