January 2019
Intermediate to advanced
460 pages
10h 33m
English
To launch our server, we have to add a new script to our package.json.
We will add the following line to the scripts property of the package.json file:
"server": "nodemon --exec babel-node --watch src/server src/server/index.js"
As you can see, we are using a command called nodemon. We need to install it first:
npm install --save nodemon
Nodemon is an excellent tool for running a Node.js application. It can restart your server when the source changes.
For example, to get the above command working follow the steps below:
Read now
Unlock full access