mirror of
https://github.com/tomru/pfadi-bussle.git
synced 2026-03-03 06:27:11 +01:00
@@ -7,14 +7,14 @@ import { uniqueFilter } from '../helpers/array'
|
||||
|
||||
let connectedPromise: Promise<mongoose.Mongoose>
|
||||
|
||||
export const MONGODB_URI = process.env.MONGODB_URI
|
||||
export const MONGO_URI = process.env.MONGO_URI
|
||||
|
||||
export function connect(): Promise<mongoose.Mongoose> {
|
||||
if (connectedPromise) {
|
||||
return connectedPromise
|
||||
}
|
||||
|
||||
connectedPromise = mongoose.connect(MONGODB_URI)
|
||||
connectedPromise = mongoose.connect(process.env.MONGO_URI)
|
||||
|
||||
return connectedPromise
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user