mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 20:23:39 +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)=>{
|
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));
|
.catch((error)=>handleConnectionError(error));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user