Closed harzgreatest closed 3 years ago
Make a file name .env in the project directory and put your connection string like
MONGO_URL=past your connection string
Make a file name .env in the project directory and put your connection string like
MONGO_URL=past your connection string
Done keep error :MongoParsError: no username povided in authority section
My bad it will be MONGO_URI instead od MONGO_URL
My bad it will be MONGO_URI instead od MONGO_URL
MONGO_URI=mongodb+srv://admin:
My bad it will be MONGO_URI instead od MONGO_URL
MONGO_URI=mongodb+srv://admin:@cluster0.kfx8y.mongodb.net/atlasAdmin?retryWrites=true&w=majority sir how to know name of database? in collection.js?
In that case 'atlasAdmin' is the database name. And one thing you forget to give the password of admin in between 'admin:' and '@cluster0.kfx8y.mongodb.net'
My bad it will be MONGO_URI instead od MONGO_URL
MONGO_URI=mongodb+srv://admin:@cluster0.kfx8y.mongodb.net/atlasAdmin?retryWrites=true&w=majority sir how to know name of database? in collection.js?
In that case 'atlasAdmin' is the database name. And one thing you forget to give the password of admin in between 'admin:' and '@cluster0.kfx8y.mongodb.net'
nah now mongo error: authentication failed Is true my database name is atlasAdmin? or I must create a database from collection.js?
Sir in file server.js have require.dotenv.config Missing file config may I know this configuration code? Is it to connect a database or what?