mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 04:22:40 +00:00
Use local_environments from config
This commit is contained in:
@@ -29,7 +29,7 @@ const disconnect = async ()=>{
|
|||||||
const connect = async (config)=>{
|
const connect = async (config)=>{
|
||||||
return await Mongoose.connect(getMongoDBURL(config), {
|
return await Mongoose.connect(getMongoDBURL(config), {
|
||||||
retryWrites : false,
|
retryWrites : false,
|
||||||
autoIndex : (config.get('node_env') == 'local' || config.get('node_env') == 'docker')
|
autoIndex : (config.get('local_environments').includes(config.get('node_env')))
|
||||||
})
|
})
|
||||||
.catch((error)=>handleConnectionError(error));
|
.catch((error)=>handleConnectionError(error));
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user