mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-09-29 13:47:57 -05:00
Export new connection data
This commit is contained in:
@@ -9,10 +9,12 @@ const { uri, database, options } = config.mongoose;
|
||||
let connection;
|
||||
|
||||
async function connect() {
|
||||
await mongoose.connect(`${uri}/${database}`, options);
|
||||
await mongoose.connect(`${uri}/${database}?replicaSet=rs0`, options);
|
||||
|
||||
connection = mongoose.connection;
|
||||
connection.on('error', console.error.bind(console, 'connection error:'));
|
||||
|
||||
module.exports.connection = connection;
|
||||
}
|
||||
|
||||
function verifyConnected() {
|
||||
|
||||
Reference in New Issue
Block a user