How to run express and angular in parallel with nx?

Viewed 2478

I'm new to nx and I want to create node express application with angular application.

So I ran those commands:

 npx create-nx-workspace // empty, nx. myorg-repo
 cd myorg-repo
 npm install --save-dev @nrwl/angular
 npm install --save-dev @nrwl/express

 nx g @nrwl/express:app express-app
 nx g @nrwl/angular:app ng-app

Now when I run npm run start or npm run build it only run one project.

My question is how to run start (serve) command in parallel with nx?

2 Answers

You can also open two separate terminals or as many as you want and can start one project from each.

terminal 1 nx serve ng-app terminal 2 nx serve express-app

Boom your servers will get started on two ports and as the proxy is already configured by nx CLI while creating a new project you just have to call your API like /API/20percentDone

Related