Find file History
Kan-Artem Update chapter6.md
`res.redirect` must be executed after `req.session.destroy`

in code below ...
```
exports.logout = (req, res, next) => {
  req.session.destroy((err) => {
    if (err) return console.log(err);
    console.log('in');
    res.redirect('/');
  });
  console.log('out');
}
```
```
output:
out
in
```
Latest commit 7495447 Oct 29, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
media add jwt Dec 31, 2017
chapter6.md Update chapter6.md Oct 29, 2018