-
Notifications
You must be signed in to change notification settings - Fork 0
Home
manishkakarla edited this page Mar 16, 2021
·
5 revisions
Welcome to the Exercise-N1 wiki!

Step 3: Create database for this app using mongodb atlas and also create collection and insert data into the collection and Retrieve data created from the database and it can be verified by using the localhost/db url.



c) git push heroku master (To deploy your app to Heroku, you typically use the git push command to push the code from your local repository’s master or main branch to your heroku remote.)
.png)
https://infinite-brook-61397.herokuapp.com/db
.png)
Step 4: Screenshot of "infinite-brook-61397.herokuapp.com/" running successfully on heroku cloud running on free dynos and web npm start being the main page.
.png)
https://account.mongodb.com/account/login

.png)
.png)
Select your driver and version and Add your connection string into your application code
Replace with the password for the Laxmanreddy123 user. Replace myFirstDatabase with the name of the database that connections will use by default. Ensure any option params are URL encoded. Then copy the URL string link and paste it in the MongoDB connection code snippet in the created app
.png)
6. I am using Mongo compass here to connect to the cluster and create a database. You can do it in MongoDB Atlas as well.
Click on Create Database and give the Database name and the Collection name.
.png)
.png)