use atlas integration env var

This commit is contained in:
Thomas Ruoff
2022-06-21 22:07:43 +02:00
parent 8a670f06ca
commit ce01da812d
2 changed files with 4 additions and 4 deletions

View File

@@ -7,14 +7,14 @@ import { uniqueFilter } from '../helpers/array'
let connectedPromise: Promise<mongoose.Mongoose>
export const MONGO_URI = process.env.MONGO_URI
export const MONGODB_URI = process.env.MONGODB_URI
export function connect(): Promise<mongoose.Mongoose> {
if (connectedPromise) {
return connectedPromise
}
connectedPromise = mongoose.connect(process.env.MONGO_URI)
connectedPromise = mongoose.connect(MONGODB_URI)
return connectedPromise
}