summary refs log tree commit diff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Database.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/Database.ts b/src/util/Database.ts
index fee3cc31..883c8dcd 100644
--- a/src/util/Database.ts
+++ b/src/util/Database.ts
@@ -6,7 +6,7 @@ const uri = process.env.MONGO_URL || "mongodb://localhost:27017/fosscord?readPre
 
 console.log(`[DB] connect: ${uri}`);
 
-const connection = mongoose.createConnection(uri, { autoIndex: true });
+const connection = mongoose.createConnection(uri, { autoIndex: true, useNewUrlParser: true, useUnifiedTopology: true });
 
 export default <Connection>connection;
 
@@ -32,6 +32,7 @@ export class MongooseCache extends EventEmitter {
 	}
 
 	init = async () => {
+		// @ts-ignore
 		this.stream = this.collection.watch(this.pipeline, { fullDocument: "updateLookup" });
 
 		this.stream.on("change", this.change);