Hey everyone!
To those who are struggling with deploying the app. These are the steps I had to do deploy it:
-
Create an account for MongoDB Atlas and create a cluster:
Get Started with Atlas — MongoDB Atlas -
Here are the changes I had to make in my program:
db.js:
custom-enviroment-variables.json:
“vidly_node_js” is the name of my database in my MongoDB Compass.
.
-
Go to your Cluster and click “CONNECT”.
-
Click on “CONNECT USING MONGODB COMPASS”.
-
Select “I have a MONGODB Compass”.
-
Use verion 1.11 or earlier.
-
And on the heroku config:set I had to use Quotation marks for my connection string:
heroku config:set “Paste connection string here”
P.S. Make sure you replace username and password with your actual values.
-
git add .
-
git commit -m “Message”
-
git push heroku master
And that’s it!