test: ✅ Create mailer test to use with uptime kuma
parent
c204ba3dc9
commit
4bb76aa4a1
10
index.js
10
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) => {
|
||||
|
||||
|
|
Loading…
Reference in New Issue