Added notifications.js (automated)

mane
Mia Raindrops 2 months ago
parent 9a034406ce
commit 78c338681e
Signed by: Mia Raindrops
GPG Key ID: EFBDC68435A574B7

@ -0,0 +1,18 @@
const axios = require('axios');
const fs = require('fs');
const YAML = require('yaml');
const config = YAML.parse(fs.readFileSync("./config.yaml").toString());
(async () => {
await axios.post(config['ntfy']['server'] + "/" + config['ntfy']['topic'], "This is a test, ignore me", {
headers: {
Title: 'Test message',
Priority: '2',
Tags: 'status'
},
auth: {
username: config['ntfy']['user'],
password: config['ntfy']['password']
}
})
})();
Loading…
Cancel
Save