From d6bbd721954a0da1b3ebc26f3d38335be8486e2e Mon Sep 17 00:00:00 2001 From: amgusain <39116841+amgusain@users.noreply.github.com> Date: Wed, 31 Oct 2018 18:51:11 -0700 Subject: [PATCH] Fixing typo (#32936) * Fixing typo: Implement the Serialization of a Passport User Fixing typo in "Implement the Serialization of a Passport User" curriculum page under "Advanced Node and Express" topic * Fix typo in 'logging a user out' page Fixing typo in 'logging a user out' page --- .../implement-the-serialization-of-a-passport-user.english.md | 2 +- .../advanced-node-and-express/logging-a-user-out.english.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.english.md b/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.english.md index 532015d601..56a1c065fc 100644 --- a/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.english.md +++ b/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/implement-the-serialization-of-a-passport-user.english.md @@ -7,7 +7,7 @@ challengeType: 2 ## Description
As a reminder, this project is being built upon the following starter project on Glitch, or cloned from GitHub. -Right now we're not loading an actually users object since we haven't set up our database. This can be done many different ways, but for our project we will connect to the database once when we start the server and keep a persistent connection for the full life-cycle of the app. +Right now we're not loading an actual user object since we haven't set up our database. This can be done many different ways, but for our project we will connect to the database once when we start the server and keep a persistent connection for the full life-cycle of the app. To do this, add MongoDB as a dependency and require it in your server. (const mongo = require('mongodb').MongoClient;) Now we want to the connect to our database then start listening for requests. The purpose of this is to not allow requests before our database is connected or if there is a database error. To accomplish you will want to encompass your serialization and your app listener in the following:
mongo.connect(process.env.DATABASE, (err, db) => {
diff --git a/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/logging-a-user-out.english.md b/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/logging-a-user-out.english.md
index 9010a2eb2e..5b47ec3fe9 100644
--- a/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/logging-a-user-out.english.md
+++ b/curriculum/challenges/english/06-information-security-and-quality-assurance/advanced-node-and-express/logging-a-user-out.english.md
@@ -14,7 +14,7 @@ In passport, unauthenticating a user is as easy as just calling req.logout
       req.logout();
       res.redirect('/');
   });
-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: +You may have noticed that 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) => {
   res.status(404)
     .type('text')