summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-14 19:01:38 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-14 19:01:38 +0100
commitfb4502bb68da849cb1dfa5c4bc179795af282911 (patch)
tree0e79a6a1e441345ebd4a698f07c62be1b543dd89
parent:sparkles: Event dispatching (diff)
downloadserver-fb4502bb68da849cb1dfa5c4bc179795af282911.tar.xz
switch to mongoose
-rw-r--r--src/Server.ts5
1 files changed, 3 insertions, 2 deletions
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<void> { - await db.init(); + // @ts-ignore + await (db as Promise<Connection>); await this.setupSchema(); await Config.init(); console.log("listening");