mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 15:47:48 +01:00
add mongodb connection options
This commit is contained in:
@@ -2,7 +2,10 @@ const mongoose = require('mongoose');
|
|||||||
const config = require('./');
|
const config = require('./');
|
||||||
|
|
||||||
async function connect() {
|
async function connect() {
|
||||||
await mongoose.connect(config.db.uri);
|
await mongoose.connect(config.db.uri, {
|
||||||
|
useNewUrlParser: true,
|
||||||
|
useUnifiedTopology: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function disconnect() {
|
async function disconnect() {
|
||||||
|
|||||||
Reference in New Issue
Block a user