When i am trying to run this code i am getting the following error
I am trying to connect mongodb database by this code but when running this code I get the error(error at the bottom of the code). One of the error was in the 7th line where it was resolved by adding { useNewUrlParser: true } but still it has more errors. I am using MongoDB version 4.0.1 . Do anybody know how to resolve this error. const express = require('express'); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); const app = express(); app.use(express.static('public')); app.set('view engine','ejs'); mongoose.connect('mongod://localhost/students', {