From f01949b9831ac477a9eadc049f04786561a490b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Thu, 28 Dec 2023 06:21:37 -0500 Subject: [PATCH] refactor(config): connect mongoose in dbconfig --- lib/dbconfig.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dbconfig.ts b/lib/dbconfig.ts index 598a16e..bef3b7d 100644 --- a/lib/dbconfig.ts +++ b/lib/dbconfig.ts @@ -1,5 +1,6 @@ import { resolve } from "path"; import * as dotenv from "dotenv"; +import mongoose from "mongoose"; const FUCKYOU = "/rockfic/abc-rockfic-v3"; dotenv.config({ path: resolve("/home/rockfic/rockfic-staging/.env") }); export const hasMigrated = false; @@ -12,3 +13,5 @@ export const olduri = process.env.NODE_ENV == "development" ? `mongodb://127.0.0.1/rockfic_old?authSource=admin` : `mongodb://${process.env.DBUSER}:${process.env.DBPASS}@127.0.0.1:27017/rockfic_old?authSource=admin`; + +await mongoose.connect(uri);