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.

Get Full-Stack React Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.