Skip to content

Commit ff5aae7

Browse files
committed
fix: minor changes
1 parent 8634892 commit ff5aae7

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ typings/
7171
.yarn-integrity
7272

7373
# dotenv environment variables file
74-
.env
7574
.env.test
7675

7776
# parcel-bundler cache (https://parceljs.org/)

package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"start": "yarn build && yarn prod",
1010
"prod": "nodemon --exec babel-node server.js",
11-
"client": "cd client && yarn start",
11+
"client": "cd client && yarn dev",
1212
"server": "nodemon --exec babel-node server.js",
1313
"dev": "concurrently \"yarn server\" \"yarn client\"",
1414
"build": "babel src --out-dir dist"
@@ -25,6 +25,7 @@
2525
"tailwindcss": "^2.2.6"
2626
},
2727
"dependencies": {
28+
"bcrypt": "^5.0.1",
2829
"chalk": "^4.1.1",
2930
"compression": "^1.7.4",
3031
"concurrently": "^6.2.0",
@@ -33,6 +34,9 @@
3334
"express": "^4.17.1",
3435
"helmet": "^4.6.0",
3536
"ip": "^1.1.5",
36-
"morgan": "^1.10.0"
37+
"joi": "^17.4.1",
38+
"mongoose": "^5.13.3",
39+
"morgan": "^1.10.0",
40+
"winston": "^3.3.3"
3741
}
3842
}

src/config/.env

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
NODE_ENV=development
2+
PROJECT_NAME='mongodb-express-react-node-backend'
3+
DB_ENV=dev
4+
PORT=5000
5+
LOG_PATH=logs
6+
HOST=localhost
7+
CONNECTION_URL=mongodb+srv://mongo-auth:[email protected]/
8+
DATABASE_NAME=mongodb-express-react-node-db

src/config/.env-example

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ NODE_ENV=development
22
PROJECT_NAME='mongodb-express-react-node-backend'
33
DB_ENV=dev
44
PORT=5000
5-
HOST=localhost
5+
HOST=localhost
6+
CONNECTION_URL=mongodb+srv://mongo-auth:<auth>@mongodb-express-react-n.96cbi.mongodb.net/
7+
DATABASE_NAME=mongodb-express-react-node-db

src/config/dbConnection.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ import { redBright, greenBright, yellowBright } from 'chalk';
44

55
// Database Name & URL
66
const DATABASE_NAME = process.env.DATABASE_NAME;
7-
export const CONNECTION_URL = process.env.CONNECTION_URL + DATABASE_NAME + '?authSource=admin&ssl=false';
8-
7+
export const CONNECTION_URL = process.env.CONNECTION_URL + DATABASE_NAME;
98
(async () => {
109
try {
1110
set('useCreateIndex', true);

0 commit comments

Comments
 (0)