updated 6-10-2020
Last year, mLab, which is the service we use for our remote Mongo database, was acquired by MongoDB. Since around the beginning of February, they have closed off all new mLab registrations. Instead, our students will be redirected to MongoDB's Atlas product, which has a free tier similar to mLab, albeit more powerful.
All current mLab users, as of this writing, can still use and create servers with their account. The old mLab instructions will be left up to support these users.
Here are the steps to setup a MongoDB account and Atlas cluster to use with the Emaily project:
1. Go to https://www.mongodb.com/cloud/atlas and click the "Start Free" button (or Sign In if you already have account)

2. Create your MongoDB user account

3. After creating your account, you will be prompted to create your first cluster.
Leave all free tier options selected - AWS, North America: N. Virginia etc.

4. Scroll down on this page to name your app:

5. Click the "Create Cluster" button:

6. The cluster will take a few minutes or more to generate, eventually you will see a page like this:

7. Click the "CONNECT" button in your cluster's sandbox. You will get the following screen asking you to whitelist your address.
Click the "Add your Current IP Address" button.

8. You will then need to create a database user and password - I would highly suggest using the "Autogenerate" button to avoid escaping issues.
After doing so, click the "Create MongoDB User" button.

9. After creating the user, you should get this success dialog box. Click the "Choose a connection method" button.

10. Select "Connect Your Application"

11. Copy the address under "Connection String Only"
When you paste this string into your application, you will need to replace <username> and <password> with the actual info created earlier and swap out the <dbname> placeholder with any arbitrary name.
Click the "Close" button and head back over to your Emaily application.

12. In your config/keys.js file create the mongoURI key-value pair if you haven't already done so.
Remember the comma if adding in-between other key-value pairs:
googleClientID: 'redacted', googleClientSecret: 'redacted', mongoURI: '', cookieKey: 'redacted',
Add the connection string by pasting the entire SRV address string you copied in the screen before.
Remember to replace <username> with the user's actual username.
Remember to replace <password> with the user's actual password.
Remember to replace <dbname> with any name you'd like.
mongoURI: 'COPY_THE_SRV_ADDRESS_STRING_HERE'
example:
mongoURI: 'mongodb+srv://p00gz:0JYnugifgjsP9UD6@emaily-uwsj6.mongodb.net/test?retryWrites=true'
Your root index.js connect function should still look like this:
mongoose.connect(keys.mongoURI);
Restart your Node server if you have not already done so.
13. In a few lectures, you will be testing adding users to your database cluster.
To see these results, navigate back to your cluster's dashboard and click the 'emaily' project link:

14. Select the 'Collections' tab:

15. You should see the collection of users and user objects that have successfully authenticated to your app:
