summary refs log tree commit diff
path: root/src/Server.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-16 21:03:32 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-16 21:03:32 +0100
commit2ffca731bdcdbb034fc581314716f56f46a691a2 (patch)
treee522b4d7214de29d6e8821d4d227a915290dd232 /src/Server.ts
parent:bug: fix error handler (diff)
downloadserver-2ffca731bdcdbb034fc581314716f56f46a691a2.tar.xz
:bug: fix db connect
Diffstat (limited to 'src/Server.ts')
-rw-r--r--src/Server.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Server.ts b/src/Server.ts

index fa4111db..d08794c8 100644 --- a/src/Server.ts +++ b/src/Server.ts
@@ -10,6 +10,7 @@ import i18nextMiddleware, { I18next } from "i18next-http-middleware"; import i18nextBackend from "i18next-node-fs-backend"; import { ErrorHandler } from "./middlewares/ErrorHandler"; import { BodyParser } from "./middlewares/BodyParser"; +import mongoose from "mongoose"; export interface DiscordServerOptions extends ServerOptions {} @@ -42,7 +43,7 @@ export class DiscordServer extends Server { async start() { // @ts-ignore - await (db as Promise<Connection>); + await mongoose.connect(process.env.MONGO_URL); await this.setupSchema(); console.log("[DB] connected"); await Promise.all([Config.init()]);