fix: updated instructions for install-and-set-up-mongoose (#37908)

Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Co-authored-by: Kevin Matsuo <kmatsuo@ARDs-MacBook-Pro-2.local>
This commit is contained in:
classicmatsuo
2019-12-13 04:53:11 -06:00
committed by mrugesh
parent 38160d6dd7
commit 33cec6b6f2

View File

@ -7,7 +7,7 @@ forumTopicId: 301540
## Description
<section id='description'>
Add mongodb and mongoose to the projects package.json. Then require mongoose. Store your MongoDB Atlas database URI in the private <code>.env</code> file as MONGO_URI. Connect to the database using the following syntax:
Add mongodb and mongoose to the projects package.json. Then require mongoose. Store your MongoDB Atlas database URI in the private <code>.env</code> file as MONGO_URI. Surround the the URI with single or double quotes and make sure no space exists between both the variable and the `=` and the value and `=`. Connect to the database using the following syntax:
```js
mongoose.connect(<Your URI>, { useNewUrlParser: true, useUnifiedTopology: true });