Hello, I've been working with the mongo database and encountering an issue while trying to save my files into it. Here is the error click here to view
https://i.sstatic.net/jaQ7x.png
While using MongoClient.connect('mongodb://localhost:27017/database', {useNewUrlParser: true, useCreateIndex: true, useUnifiedTopology: true }), I'm faced with this error message:
.then(client => {
console.log('Mongo Connected!!!');
const db = client.db('database');
const collection = db.collection('files');
app.locals.fileCollection = collection;
});
Any assistance would be greatly appreciated.