I have succeeded in moving my codes to heroku, set up my environment variables. I chose the Allow access from anywhere when whitelisting my IP but I still get this error
An error occurred: MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/
I have used fixie which is an addon in heroku to generate static IP address and I added this static address to my list of whitelisted IPs and I still get the same issue.
I do not know what I am doing wrong
Here is my connection string
mongodb+srv://test_user:<password>@test-cluster.86mbw.mongodb.net/<dbname>?retryWrites=true&w=majority
my mongoose version is 5.9.16