Skip to content

Update app.js#1

Open
jessevinco wants to merge 2 commits intoSchmidtRichard:masterfrom
jessevinco:patch-1
Open

Update app.js#1
jessevinco wants to merge 2 commits intoSchmidtRichard:masterfrom
jessevinco:patch-1

Conversation

@jessevinco
Copy link

@jessevinco jessevinco commented Jul 5, 2022

mongoose.connect("mongodb://localhost:27017/userDB");

//Target the logout route, if not it won't work.//

app
.route("/logout")
.get((req, res) => {
req.logout(function(error) {
if (error) { return next(error); }
res.redirect("/");
});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant