text:mail.text("Looks like everything's working! "),
html:mail.html("<p>Looks like everything's working! </p>")
})
.then(()=>{
console.log('Test email should have sent...')
res.sendStatus(200)
})
.catch((err)=>{
mw.throwErr(err,req)
res.sendStatus(500)
})
})
.get('/password',(req,res)=>{
res.render('password')
})
.post('/password',(req,res,next)=>{
letzxcvbnResult=zxcvbn(req.body.password)
if(zxcvbnResult.crack_times_seconds.online_no_throttling_10_per_second<864000){// Less than ten days
leterr=newError(`That password could be cracked in ${zxcvbnResult.crack_times_display.online_no_throttling_10_per_second}! Come up with a more complex password that would take at least 10 days to crack. `)