refactor(config): connect mongoose in dbconfig
This commit is contained in:
parent
d3417ae9e6
commit
f01949b983
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user