mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 16:22:44 +00:00
Add autobuild to Mongoose connection (local/docker ONLY)
This commit is contained in:
@@ -27,7 +27,10 @@ const disconnect = async ()=>{
|
||||
};
|
||||
|
||||
const connect = async (config)=>{
|
||||
return await Mongoose.connect(getMongoDBURL(config), { retryWrites: false })
|
||||
return await Mongoose.connect(getMongoDBURL(config), {
|
||||
retryWrites : false,
|
||||
autoIndex : (config.get('node_env') == 'local' || config.get('node_env') == 'docker')
|
||||
})
|
||||
.catch((error)=>handleConnectionError(error));
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user