image_node/routes/logout.js
2020-04-28 23:16:19 +02:00

12 lines
182 B
JavaScript

let router = require("express").Router();
router.get("/", (req, res) => {
req.session.login = false;
req.session.save();
res.redirect("/login");
});
module.exports = router;