small edits

This commit is contained in:
Ben Elferink
2021-03-13 17:49:21 +02:00
parent bc37d68394
commit c349907802
5 changed files with 13 additions and 6 deletions

View File

@@ -1,2 +1 @@
CONNECTION_URL = "MongoDB connection URL"
PORT = "4 digits"
MONGO_URI = "MongoDB connection URL"

6
server/.gitignore vendored
View File

@@ -14,4 +14,8 @@
.env.development.local
.env.test.local
.env.production.local
.eslintcache
.eslintcache
npm-debug.log*
yarn-debug.log*
yarn-error.log*

View File

@@ -18,8 +18,8 @@ app.use(express.urlencoded({ limit: '1mb', extended: false })); // url parser
app.use(morgan('common'));
// configure db:
// for "atlas" edit CONNECTION_URL in -> .env file || for "community server" edit <dbname>
const CONNECTION_URL = process.env.CONNECTION_URL || 'mongodb://localhost:27017/<dbname>';
// for "atlas" edit MONGO_URI in -> .env file || for "community server" edit <dbname>
const CONNECTION_URL = process.env.MONGO_URI || 'mongodb://localhost:27017/<dbname>';
const DEPRECATED_FIX = { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true };
// connect to db