Update develop.md

Remove duplicated instructions in the nodemon installation step and add an instruction for npm install command.
This commit is contained in:
Norah H 2021-01-23 09:52:46 +09:00 committed by GitHub
parent 4b59234515
commit e7085f77be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 10 deletions

View File

@ -147,6 +147,7 @@ We are exposing `port 9229` so that we can attach a debugger. We are also mappin
One other really cool feature of using a Compose file is that we have service resolution set up to use the service names. So we are now able to use `“mongo”` in our connection string. The reason we use mongo is because that is what we have named our MongoDB service in the Compose file as.
To start our application in debug mode, we need to add a line to our `package.json` file to tell npm how to start our application in debug mode.
As you can see, we are going to use nodemon. Nodemon starts our server in debug mode and also watches for files that have changed, and restarts our server. Lets add nodemon to our `package.json` file.
Open the `package.json` file and add the following line to the scripts section:
@ -154,16 +155,7 @@ Open the `package.json` file and add the following line to the scripts section:
"debug": "nodemon --inspect=0.0.0.0:9229 server.js"
```
As you can see, we are going to use nodemon. Nodemon starts our server in debug mode and also watches for files that have changed, and restarts our server. Lets add nodemon to our `package.json` file.
```json
$ npm install nodemon
```
To start our application in debug mode, we need to add a line to our `package.json` file to tell npm how to start our application in debug mode.
Open the `package.json` file and add the following line to the scripts section.
As you can see, we are going to use `nodemon`. Nodemon starts our server in debug mode and also watches for files that have changed, and restarts our server. Lets add nodemon to our `package.json` file.
Then run the following command in the terminal to install nodemon into our project directory.
```json
$ npm install nodemon