image_node/routes/logout.js

13 lines
182 B
JavaScript
Raw Normal View History

2020-04-28 23:16:19 +02:00
let router = require("express").Router();
router.get("/", (req, res) => {
req.session.login = false;
req.session.save();
res.redirect("/login");
});
module.exports = router;