Skip to content

old version of mongoose  #3

@ImadCSdev

Description

@ImadCSdev

if someone have a probleme like this : throw new MongooseError('Mongoose.prototype.connect() no longer accepts a callback');
when you use " mongoose.connect(process.env.MONGO_URL, (err) => {
if (err) throw err;
});
you can fixe it by :
mongoose.connect(process.env.MONGO_URL)
.then(()=>{
console.log("connection successfuly !")
}).catch((err)=>{
console.log("unsuccessfull connection")
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions