I am trying to run my flask application with mongoDB. I have added config file of mongodb to connect with it. I end up getting an error message when i try to run the application.
this is my config.py
import os
class Config:
MONGO_URI = os.getenv('MONGO_URI', 'mongodb+srv://<username>:<password>@cluster0.hcccttb.mongodb.net/<database-name>')
JWT_SECRET_KEY = os.getenv('JWT_SECRET', '123456.')
You can refer to my full code
I try to run my flask application with mongoDB and getting the error: pymongo.errors.ConfigurationError: The DNS query name does not exist: _mongodb._tcp.cluster0.mongodb.net.
New contributor
Arun Prasad M is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.