skip to Main Content

Can Javascript connect to mongodb?

I got error "throw new MongooseError('Mongoose.prototype.connect() no longer accepts a callback');" const mogoURI = "mongodb://localhost:27017/?directConnection=true"; const connectToMongo = ()=>{ mongoose.connect(mogoURI,()=>{ console.log("Connected to Mongo Successfully"); }) } module.exports = connectToMongo;```

VIEW QUESTION

How to change MongoDB pwd in Docker Compose?

I tried to change the mongodb password in docker-compose.yaml file directly by changing the - MONGO_INITDB_ROOT_PASSWORD parameter within environment in mongodb service. Here is my docker-compose.yaml file before changing the password: mongo-dev: container_name: mongo-dev image: mongo restart: unless-stopped environment: -…

VIEW QUESTION
Back To Top
Search