lot/libs/gotify.js
2022-06-22 11:00:50 +01:00

21 lines
448 B
JavaScript

const gotify = require('jotify');
gotify.url = 'https://push.caliban.io';
gotify.token = 'A_OY8j2kRWJOJig';
gotify.priority = 7;
const prefix = process.env.NODE_ENV === 'production' ? 'Production' : 'Dev';
const title = `mdLot ${ prefix } Alert`;
module.exports = {
'push' : function(contents) {
const now = new Date();
const msg = `Updated at ${new Date(now).toLocaleString()}\n\n${contents}`;
gotify.send(title, msg);
}
};