index.js 297 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 var express = require('express') var app = express() var router = express.Router(); router.get('/', function(req, res){ console.log(req.user+" 유저가 로그아웃합니다.") req.logout(); req.session.save(function(){ res.redirect('/'); }) }); module.exports = router;