I am encountering an issue while trying to connect my Express.js application to MongoDB using Mongoose

22 Views Asked by At

Despite successfully making the connection, I am unable to create a database in MongoDB Compass. Node v18.16.0 code

const mongoose = require("mongoose");
mongoose.connect("mongodb://127.0.0.1:27017/largeData")
.then(()=>{
    console.log("connected successfull");
})
.catch((err)=>{console.log(err);})

Any insights into what might be causing this issue would be greatly appreciated.

0

There are 0 best solutions below