toror33

logout 기능 구현

...@@ -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;
......