Showing
1 changed file
with
4 additions
and
0 deletions
| ... | @@ -6,4 +6,8 @@ router.get('/', function(req, res, next) { | ... | @@ -6,4 +6,8 @@ router.get('/', function(req, res, next) { |
| 6 | res.render('index', { title: 'Express' }); | 6 | res.render('index', { title: 'Express' }); |
| 7 | }); | 7 | }); |
| 8 | 8 | ||
| 9 | +router.get('/logout',function (req,res) { | ||
| 10 | + req.logout(); | ||
| 11 | + res.redirect('/'); | ||
| 12 | +}); | ||
| 9 | module.exports = router; | 13 | module.exports = router; | ... | ... |
-
Please register or login to post a comment