// Try using 127.0.0.1 instead of localhost in connection url
// mongodb://localhost:27017
// mongodb://127.0.0.1:27017
const mongoose = require('mongoose');
mongoose.connect('mongodb://127.0.0.1:27017').then(() => {
console.log("connected to database");
})