0

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?

1
  • use "start" property under "scripts" in package.json. "scripts": { start: node server.js && ng serve } Commented Dec 2, 2017 at 17:09

1 Answer 1

2

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.