refactor: create a constant to hold path to .env
file (this is temporary)
--- REVERT THIS ---
This commit is contained in:
parent
72da42f96a
commit
9f180a4d30
@ -1,10 +1,13 @@
|
|||||||
|
import { resolve } from "path";
|
||||||
import * as dotenv from "dotenv";
|
import * as dotenv from "dotenv";
|
||||||
dotenv.config({path: "../"})
|
const FUCKYOU = "/rockfic/abc-rockfic-v3";
|
||||||
console.log("in dbconfig", process.env.NODE_ENV)
|
dotenv.config({ path: resolve(FUCKYOU, ".env") });
|
||||||
export const hasMigrated = false;
|
export const hasMigrated = false;
|
||||||
export const uri = (process.env.NODE_ENV == "development") ?
|
export const uri =
|
||||||
`mongodb://127.0.0.1/test?authSource=admin` :
|
process.env.NODE_ENV == "development"
|
||||||
`mongodb://${process.env.DBUSER}:${process.env.DBPASS}@${process.env.DB}?authSource=admin`
|
? `mongodb://127.0.0.1/test?authSource=admin`
|
||||||
export const olduri = (process.env.NODE_ENV == "development") ?
|
: `mongodb://${process.env.DBUSER}:${process.env.DBPASS}@${process.env.DB}?authSource=admin`;
|
||||||
`mongodb://127.0.0.1/rockfic_old?authSource=admin` :
|
export const olduri =
|
||||||
`mongodb://${process.env.DBUSER}:${process.env.DBPASS}@127.0.0.1/rockfic_old?authSource=admin`
|
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/rockfic_old?authSource=admin`;
|
||||||
|
Loading…
Reference in New Issue
Block a user