Cobweb
Cobweb

Reputation: 17

How to concurrently run nodejs and angular4 with single command?

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

Answers (1)

OdkoPP
OdkoPP

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

Related Questions