How to change angular port from 4200 to any other

Ashutosh Jha picture Ashutosh Jha · Nov 21, 2016 · Viewed 410.4k times · Source

I want to use 5000 instead of 4200.

I have tried to create a file on root name ember-cli and put JSON according to the code below:

{
   "port": 5000
}

But my app still runs on 4200 instead of 5000

Answer

David picture David · Jul 27, 2017

The solution worked for me was

ng serve --port 4401    

(You can change 4401 to whatever number you want)

Then launch browser -> http://localhost:4401/

Basically, I was having two Applications and with the help of the above approach now I am able to run both of them simultaneously in my development environment.