From 4c340fd0ba028a148dbac4ec6bafea9a223512bb Mon Sep 17 00:00:00 2001 From: LaraClara Date: Mon, 12 Jun 2023 13:29:01 +1000 Subject: [PATCH] chore: Add warning if mongodb url looks incorrect in install --- config/install.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/install.js b/config/install.js index a5e8a4fe08..2ca1fa9fea 100644 --- a/config/install.js +++ b/config/install.js @@ -102,6 +102,10 @@ const askQuestion = (query) => { 'What is your mongodb url? (default: mongodb://127.0.0.1:27017/LibreChat)' ); env['MONGO_URI'] = mongodb || 'mongodb://127.0.0.1:27017/LibreChat'; + // Very basic check to make sure they entered a url + if (!env['MONGO_URI'].includes('://')) { + console.warn('Warning: Your mongodb url looks incorrect, please double check it in the `.env` file.'); + } // Update the env file loader.writeEnvFile(rootEnvPath, env);