From c349907802a90e353dd0c542974c2a5f71cadb5d Mon Sep 17 00:00:00 2001 From: Ben Elferink Date: Sat, 13 Mar 2021 17:49:21 +0200 Subject: [PATCH] small edits --- client/.env.example | 0 client/.gitignore | 6 +++++- server/.env.example | 3 +-- server/.gitignore | 6 +++++- server/index.js | 4 ++-- 5 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 client/.env.example diff --git a/client/.env.example b/client/.env.example new file mode 100644 index 0000000..e69de29 diff --git a/client/.gitignore b/client/.gitignore index 2ac7d85..ab681c6 100644 --- a/client/.gitignore +++ b/client/.gitignore @@ -14,4 +14,8 @@ .env.development.local .env.test.local .env.production.local -.eslintcache \ No newline at end of file +.eslintcache + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/server/.env.example b/server/.env.example index 9a3aaa0..238b404 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,2 +1 @@ -CONNECTION_URL = "MongoDB connection URL" -PORT = "4 digits" \ No newline at end of file +MONGO_URI = "MongoDB connection URL" \ No newline at end of file diff --git a/server/.gitignore b/server/.gitignore index 2ac7d85..ab681c6 100644 --- a/server/.gitignore +++ b/server/.gitignore @@ -14,4 +14,8 @@ .env.development.local .env.test.local .env.production.local -.eslintcache \ No newline at end of file +.eslintcache + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/server/index.js b/server/index.js index 9225bfa..6de608c 100644 --- a/server/index.js +++ b/server/index.js @@ -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 -const CONNECTION_URL = process.env.CONNECTION_URL || 'mongodb://localhost:27017/'; +// for "atlas" edit MONGO_URI in -> .env file || for "community server" edit +const CONNECTION_URL = process.env.MONGO_URI || 'mongodb://localhost:27017/'; const DEPRECATED_FIX = { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true }; // connect to db