Reputation: 1042
I want to run multiple apps at the same time with angular-cli.
I've followed these steps: https://yakovfain.com/2017/04/06/angular-cli-multiple-apps-in-the-same-project/
If I serve app0 or app1, they run without any problem. But my problem is, I want these apps run at the same time. Some routes should run app0, some routes should run app1.
In package.json, I wrote this script:
"develop-both": "ng serve --app 0 --proxy-config proxy.conf.json && ng serve --app 1 --proxy-config proxy.conf.json"
But this script only runs first app in angular-cli.json. How can I achieve that?
Upvotes: 3
Views: 4435
Reputation: 1042
SOLUTION
I've found the solution for running multiple scripts with the help of David in comment section of the question.
Here is how I run multiple scripts:
"develop-both": "ng serve --app 0 --proxy-config proxy.conf.json --port 4200 | ng serve --app 1 --proxy-config proxy.conf.json --port 4201"
I needed to run these apps in different ports. One of them is running in 4200, the other running in 4201.
Upvotes: 3