From f86ec6471400cdfefe08e17bab07244992d0ff0e Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:19:34 -0500 Subject: [PATCH] change localhost to 127.0.0.1 node v16+ better utilizes the address 127.0.01 rather than localhost, at least on MacOS while still working for Windows. --- server/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/db.js b/server/db.js index 030d7f61b..cd8308c1b 100644 --- a/server/db.js +++ b/server/db.js @@ -10,7 +10,7 @@ const Mongoose = require('mongoose'); const getMongoDBURL = (config)=>{ return config.get('mongodb_uri') || config.get('mongolab_uri') || - 'mongodb://localhost/homebrewery'; + 'mongodb://127.0.0.1/homebrewery'; // changed from mongodb://localhost/homebrewery to accommodate versions 16+ of node. }; const handleConnectionError = (error)=>{