diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-04-06 23:55:26 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-04-06 23:55:26 +0200 |
commit | 011251868d4ec0c4d6cda4509d38e09d7d331cf2 (patch) | |
tree | 2c4aa589d4fee812e116edca71680071e3b6b2ef /src | |
parent | :art: remove _id and __v from response (diff) | |
parent | Merge pull request #2 from afeuerstein/main (diff) | |
download | server-011251868d4ec0c4d6cda4509d38e09d7d331cf2.tar.xz |
Merge branch 'main' of https://github.com/discord-open-source/discord-server-util into main
Diffstat (limited to 'src')
-rw-r--r-- | src/util/Database.ts | 3 |
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); |