Advanced Node and Express - Logging a User Out

As a reminder, this project is being built upon the following starter project on Glitch, or cloned from GitHub.

Creating the logout logic is easy. The route should just unauthenticate the user and redirect to the home page instead of rendering any view.

In passport, unauthenticating a user is as easy as just calling req.logout(); before redirecting.

  .get((req, res) => {

You may have noticed we also we're not handling missing pages (404), the common way to handle this in Node is with the following middleware. Go ahead and add this in after all your other routes:

app.use((req, res, next) => {
    .send('Not Found');

Submit your page when you think you've got it right.

Get a hint