Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb ur #13

Open
Aryan1974 opened this issue Aug 22, 2022 · 2 comments
Open

mongodb ur #13

Aryan1974 opened this issue Aug 22, 2022 · 2 comments

Comments

@Aryan1974
Copy link

Screenshot 2022-08-22 105904

my question is How do i solve this

@anujsinghrawat
Copy link

there is some problem with dotenv
for this you can import uri in the file instead of using config.env file

@Fahad123k
Copy link

remove these lines
// useFindAndModify: false,
// useCreateIndex: true
const connectDB = async () => {
try{
// mongodb connection string
const con = await mongoose.connect(process.env.MONGO_URL,{
useNewUrlParser: true,
useUnifiedTopology: true,
// useFindAndModify: false,
// useCreateIndex: true

    })

    console.log(`MongoDB connected :${con.connection.host}`);
}catch(err){
    console.log(err);
    process.exit(1);
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants