From 1af3c64fdaeac5fa8d34c359d9df403eccbbc749 Mon Sep 17 00:00:00 2001 From: Rob Cowsill <42620235+rcowsill@users.noreply.github.com> Date: Sat, 10 Oct 2020 16:59:16 +0100 Subject: [PATCH] Remove MONGOLAB_URI and mlab connection string * MONGOLAB_URI isn't needed as the mongolab addon has been removed * Removed the old mlab connection URI as that database will be deleted * Default db is localhost:27017, for all other cases set MONGODB_URI (don't commit database credentials to a public repo) --- config/env/all.js | 6 +----- config/env/development.js | 12 ------------ 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/config/env/all.js b/config/env/all.js index 70641ec73..bbc562aa4 100755 --- a/config/env/all.js +++ b/config/env/all.js @@ -1,11 +1,7 @@ // default app configuration const port = process.env.PORT || 4000; -let db = process.env.MONGOLAB_URI || process.env.MONGODB_URI; - -if (!db) { - db = process.env.NODE_ENV === 'test' ? "mongodb://localhost:27017/nodegoat" : "mongodb://nodegoat:owasp@ds159217.mlab.com:59217/nodegoat"; -} +let db = process.env.MONGODB_URI || "mongodb://localhost:27017/nodegoat"; module.exports = { port, diff --git a/config/env/development.js b/config/env/development.js index d19453964..40d92bb1b 100755 --- a/config/env/development.js +++ b/config/env/development.js @@ -1,16 +1,4 @@ module.exports = { - // Local instance. - // To install mongodb: https://docs.mongodb.org/manual/tutorial/ - // With mongodb installed, All you should need to do is uncomment the `db` property below, and run the following command: - // grunt db-reset:development - // That will create the local nodegoat data-store, or restore it to a clean state if it already exists. - - // db: "mongodb://localhost:27017/nodegoat", - - // If you want to use a MongoLab instance, just sign up for it, create a data-store, in this example we call it nodegoat. - // and again just run the grunt db-reset:development command - //db: 'mongodb://:@', - // If you want to debug regression tests, you will need the following which is also in the test config: zapHostName: "192.168.56.20", zapPort: "8080",