![heroku 404 not found heroku 404 not found](https://i.imgur.com/cWM3VHD.jpg)
Just remember to delete this “public access” once your app is live (or if you upgrade your heroku app). Give it a couple of minutes and you’re done.
![heroku 404 not found heroku 404 not found](https://aws1.discourse-cdn.com/brave/optimized/3X/5/d/5dbb9243eec7769eb585963ae5ad2874e059eb74_2_690x394.png)
Click on Add IP Address and fill the Whitelist Entry with 0.0.0.0/0 and Confirm.Now, for the actual firewall, go to Security -> Network Access.Where it says Database write the name of the database you want to use.Where it says Select Role, choose readWrite.The idea is to create a new user with read/write access only to a specific database (in case your information leaks and the database is breached, your other databases and admin DB is protected). On the left panel, click on Security -> Database Access -> Add new Database User.Make sure you’ve created the database you’re going to use, otherwise (on the left panel) click on Atlas -> Clusters -> Collections -> Create Database.If it’s not a free tier you should be able to get the IP from the dashboard.įor now, I’ll assume you’re using the free tier, hence we will allow public access (0.0.0.0/0): If this is a free tier app, you may be forced to use 0.0.0.0/0, which grants access to everyone on the internet (without your username/password, it’s not too much of a problem, so use hard to guess username/password, ideally random).
#Heroku 404 not found how to
T18:09:51.983681+00:00 app: MongooseError : connection to 44.232.64.63:27017 closedĬould you give me instructions on how to allow the app IP to pass through?įirst things first, you need to have the IP of your heroku app. nnect( || 'mongodb://localhost/book_trak', Here is my index.js: const express = require('express')