ecommerce-website/routes/logout.js

11 lines
201 B
JavaScript
Raw Normal View History

2024-03-10 20:04:53 +00:00
const express = require('express');
const router = express.Router();
router.get('/', function(req, res, next) {
req.session.user = null;
res.redirect("/login");
});
module.exports = router;