Full-Stack React Projects
上QQ阅读APP看书,第一时间看更新

Running scripts

To run the server as we develop the code for only the backend, we can start with the npm run development script in the package.json file. For the complete skeleton application, we will use the same run scripts defined in Chapter 2, Preparing the Development Environment.

mern-skeleton/package.json:

"scripts": {
"development": "nodemon"
}

npm run development: Running this in the command line from your project folder will basically start Nodemon according to the configuration in nodemon.js. The configuration instructs Nodemon to monitor the server files for updates, and on update to build the files again, then restart the server so the changes are immediately available.