diff --git a/src/Server.ts b/src/Server.ts index 3bd10928..302aea81 100644 --- a/src/Server.ts +++ b/src/Server.ts @@ -12,11 +12,12 @@ export class Server { async setupSchema() { // TODO: adjust expireAfterSeconds -> lower - await db.conn.db.collection("events").createIndex({ created_at: 1 }, { expireAfterSeconds: 60 }); + await db.collection("events").createIndex({ created_at: 1 }, { expireAfterSeconds: 60 }); } async listen(): Promise { - await db.init(); + // @ts-ignore + await (db as Promise); await this.setupSchema(); await Config.init(); console.log("listening");