MongoDB
Installation
Visit https://account.mongodb.com/account/login to sign up
and login to MongoDB. The
CS
MongoDBAtlas video shows how to:
- Create a MongoDB account
- Create a database and a collection
- Update your IP setting so the database can be access from anywhere
The above video does not go over how to get the URL you need to connect from a
Node.js application. To get this information from Atlas:
- Select "Database" under "Deployment"
- Select "Connect" next to "Cluster0"
- Select "Connect your application"
- Select "Drivers (underneath you will see "Access your Atlas ...")"
- Under "Driver" select "Node.js" and you will see the connection string
- If you scroll down you will see a section with the heading
"Add your connection string into your application code". That represnts
the string you need to connect to your database (once you replace
the <password> with the appropriate password).
Write down in a safe place the username and password for your account. You
will need it when writing a Node.js application that will connnect
to the database.
Remember that you don't need to pay anything; we are using the free option.
Additional Information