This is the backend application which I built using Express/Node.js and MongoDB/Mongoose.
It is used as one of the APIs for Covid19-SG.
Using 0.0.0.0/0 for the IP Whitelist on MongoDB Atlas is NOT RECOMMENDED.
Instead, an alternative solution could be to use QuotaGuard Static IP Address to whitelist the IP address for the outbound traffic from the Express/Node.js application to MongoDB Atlas.
This is recommended because 0.0.0.0/0 makes your DB publicly accessible, and hence vulnerable to attacks.
Please refer to the References section for more information.
- Deploying MongoDB on Heroku
- QuotaGuard Heroku Plugin that allows you to route inbound/outbound traffic through a static IP address that is whitelisted on your MongoDB Atlas cluster
- QuotaGuard Dashboard to view your Request & Bandwidth usage
- MongoDB Documentation on IP Whitelist
- MongoDB Security Checklist - Limit Network Exposure
- MongoDB Forums