I have created an Angular app. I have created mock server using json-server plugin from node.
Currently problem with this is, I have to open multiple command prompt to run json server and angular cli.
Is there any way where I can execute both the commands in parallel. OR is there any way where I will run ng serve and in behind it runs the json-server command as well?
You can try to use the package called concurrently.
npm install concurrently --save-dev
Then setup your package.json scripts:
"start": "concurrently --kill-others \"npm run server\" \"ng serve\""
or on unix systems without the library
"start": "npm run server | ng serve"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With