From 4bb76aa4a14650c54fed1b8acfe0e3c756ab9281 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Fri, 22 Sep 2023 20:54:38 -0600 Subject: [PATCH] test: :white_check_mark: Create mailer test to use with uptime kuma --- index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.js b/index.js index 7b8f09f..4b364d9 100644 --- a/index.js +++ b/index.js @@ -17,6 +17,16 @@ const mailer = require('nodemailer').createTransport({ }, }) +// Test mailer +app.get('/', async (req, res) => { + try { + await mailer.verify() + return res.sendStatus(200) + } catch (err) { + return res.status(500).send(err) + } +}) + app.use(express.json()).use(cors()) .options('/').post('/', async (req, res) => {