summary refs log tree commit diff
path: root/src/util/Database.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/Database.ts')
-rw-r--r--src/util/Database.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/util/Database.ts b/src/util/Database.ts
index 2304378c..1ebfbd12 100644
--- a/src/util/Database.ts
+++ b/src/util/Database.ts
@@ -1,12 +1,9 @@
 import "./MongoBigInt";
-import mongoose, { Collection, Connection } from "mongoose";
+import mongoose, { Collection } from "mongoose";
 import { ChangeStream, ChangeEvent, Long } from "mongodb";
 import EventEmitter from "events";
-const uri = process.env.MONGO_URL || "mongodb://localhost:27017/fosscord?readPreference=secondaryPreferred";
 
-const connection = mongoose.createConnection(uri, { autoIndex: true });
-
-export default <Connection>connection;
+export default mongoose.connection;
 
 export interface MongooseCache {
 	on(event: "delete", listener: (id: string) => void): this;