connect() mở kết nối mặc định với db. Vì bạn muốn có hai kết nối khác nhau, hãy sử dụng createConnection() .
Liên kết API:https://mongoosejs.com/docs/api.html#index_Mongoose-createConnection
connect() mở kết nối mặc định với db. Vì bạn muốn có hai kết nối khác nhau, hãy sử dụng createConnection() .
Liên kết API:https://mongoosejs.com/docs/api.html#index_Mongoose-createConnection