Skip to content

Commit

Permalink
Remove MONGOLAB_URI and mlab connection string
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
rcowsill committed Oct 10, 2020
1 parent 12fa8fa commit 1af3c64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
6 changes: 1 addition & 5 deletions config/env/all.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
12 changes: 0 additions & 12 deletions config/env/development.js
Original file line number Diff line number Diff line change
@@ -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://<dbuser>:<dbpassword>@<databasename>',

// 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",
Expand Down

0 comments on commit 1af3c64

Please sign in to comment.