简体   繁体   中英

Handling Mongoose connection failure in NestJS

I am new to NestJS.

I am trying to connect to mongo instance, like this MongooseModule.forRoot('mongodb://localhost:27017/demo')

How can I handle no connection here.

Probably you wrote wrong database URL. You have to follow official documentation: Mongo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM