Heroku deployment issue solved!

Hey everyone!

To those who are struggling with deploying the app. These are the steps I had to do deploy it:

  1. Create an account for MongoDB Atlas and create a cluster:
    Get Started with Atlas — MongoDB Atlas

  2. Here are the changes I had to make in my program:

db.js:

db

custom-enviroment-variables.json:

“vidly_node_js” is the name of my database in my MongoDB Compass.

cev.

  1. Go to your Cluster and click “CONNECT”.

  2. Click on “CONNECT USING MONGODB COMPASS”.

  3. Select “I have a MONGODB Compass”.

  4. Use verion 1.11 or earlier.

  5. 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.

  1. git add .

  2. git commit -m “Message”

  3. git push heroku master

And that’s it!

Where can I set the name of my database in my MongoDB Compass? Is that the same as my cluster name when creating a new database? I guess not, because special characters are not allowed while choosing a name for your cluster.