Reputation: 17
I have angular4 and nodesjs on the server side. How can I combine the scripts in package.json so that the node server and angular start in a single shot?
Upvotes: 0
Views: 2033
Reputation: 492
Use concurrently and nodemon
Install these packages using
npm i concurrently nodemon
Add the following line to package.json
scripts": {
"serve": "concurrently \"ng serve\" \"./node_modules/nodemon/bin/nodemon.js ./node_server/bin/www\"",
}
Run the script using
npm run serve
Upvotes: 2