removed nodemon from dependecies

Most devs have Nodemon installed globally on their system, so I removed the dependecy, and when a user types "npm start" on the server app, it will first look for nodemon, and if not found then it will do the standard "node server.js"
This commit is contained in:
Ben Elferink
2020-12-30 15:32:33 +02:00
parent 1c9a390ee7
commit ab6817973d
2 changed files with 18 additions and 26 deletions

View File

@@ -18,11 +18,10 @@ Here is a [demonstration video](https://youtu.be/e81rqD94QtM) of the following s
### STEP 1:
Click ["Use this template"](https://github.com/belferink1996/MERN-template/generate) to generate a new repository.<br />
Then open your terminal and clone your repository:
Click ["Use this template"](https://github.com/belferink1996/MERN-template/generate) to generate a
new repository.<br /> Then open your terminal and clone your repository:
> cd ~/Desktop <br />
> git clone https://github.com/[your-user-name]/[your-repo-name].git
> cd ~/Desktop <br /> git clone https://github.com/[your-user-name]/[your-repo-name].git
<br />
@@ -30,9 +29,7 @@ Then open your terminal and clone your repository:
Go to your client folder (frontend), and set your workspace:
> cd ~/Desktop/[your-repo-name]/client <br />
> npm install <br />
> npm start
> cd ~/Desktop/[your-repo-name]/client <br /> npm install <br /> npm start
```
We're unable to detect target browsers.
@@ -45,15 +42,12 @@ Would you like to add the defaults to your package.json? (Y/n)
### STEP 3:
Prepare your MongoDB database ([atlas](https://www.mongodb.com/cloud/atlas), [community](<https://github.com/belferink1996/MERN-template/wiki/Install-MongoDB-Community-Server-(MacOS)>)),<br />
Prepare your MongoDB database ([atlas](https://www.mongodb.com/cloud/atlas),
[community](<https://github.com/belferink1996/MERN-template/wiki/Install-MongoDB-Community-Server-(MacOS)>)),<br />
then go to your server folder (backend), and set your workspace:
> cd ~/Desktop/[your-repo-name]/server <br />
> npm install <br />
Set your database within `index.js`, then start server:
> npm start
> cd ~/Desktop/[your-repo-name]/server <br /> npm install <br /> Set your database within
> `index.js`, then start server: npm start
<br />
@@ -66,15 +60,14 @@ Set your database within `index.js`, then start server:
###### Client:
> axios: ^0.21.0 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Use the API<br />
> react: ^17.0.1 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; UI framework<br />
> react-dom: ^17.0.1 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; UI framework<br />
> react-scripts: ^4.0.1 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Quickly launch local service
> axios: ^0.21.0 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Use the API<br /> react: ^17.0.1
> &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; UI framework<br /> react-dom: ^17.0.1
> &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; UI framework<br /> react-scripts: ^4.0.1
> &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Quickly launch local service
###### Server:
> cors: ^2.8.5 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Enable HTTP requests<br/>
> dotenv: ^8.2.0 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Secure sensitive information<br />
> express: ^4.17.1 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Server app<br />
> mongoose: ^5.11.8 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; MongoDB database<br />
> nodemon: ^2.0.6 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Improved local service
> cors: ^2.8.5 &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Enable HTTP requests<br/> dotenv: ^8.2.0
> &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Secure sensitive information<br /> express: ^4.17.1
> &nbsp;&nbsp;&nbsp; ---> &nbsp;&nbsp;&nbsp; Server app<br /> mongoose: ^5.11.8 &nbsp;&nbsp;&nbsp;
> ---> &nbsp;&nbsp;&nbsp; MongoDB database

View File

@@ -4,7 +4,7 @@
"main": "server.js",
"type": "module",
"scripts": {
"start": "nodemon server.js"
"start": "nodemon server.js||node server.js"
},
"author": "Ben Elferink",
"license": "ISC",
@@ -12,7 +12,6 @@
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"mongoose": "^5.11.8",
"nodemon": "^2.0.6"
"mongoose": "^5.11.8"
}
}