0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 14:12:40 +00:00

Use local_environments from config

This commit is contained in:
G.Ambatte
2025-07-20 11:48:22 +12:00
parent d9cd270f3b
commit 4856c803ed

View File

@@ -29,7 +29,7 @@ const disconnect = async ()=>{
const connect = async (config)=>{
return await Mongoose.connect(getMongoDBURL(config), {
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));
};