From e7085f77be44cf2b4d9573fbb2a31025167d0e39 Mon Sep 17 00:00:00 2001 From: Norah H Date: Sat, 23 Jan 2021 09:52:46 +0900 Subject: [PATCH] Update develop.md Remove duplicated instructions in the nodemon installation step and add an instruction for npm install command. --- language/nodejs/develop.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/language/nodejs/develop.md b/language/nodejs/develop.md index f7946fd961..3462ddccbe 100644 --- a/language/nodejs/develop.md +++ b/language/nodejs/develop.md @@ -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. Let’s 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. Let’s 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. Let’s 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