Express logout

PHOTO EMBED

Thu Aug 19 2021 18:54:54 GMT+0000 (UTC)

Saved by @ExplodeMilk #express #typescript

async function logout(req:express.Request,res:express.Response){
    if(req.session){
        delete req.session['user'];
    }
    res.redirect('/login.html');
}
content_copyCOPY