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:
{
&q
goto this file
node_modules\@angular-devkit\build-angular\src\dev-server\schema.json
and search port
"port": {
"type": "number",
"description": "Port to listen on.",
"default": 4200
},
change default value whatever you want and restart the server
You can try:
ng serve --host 0.0.0.0 --port 4001
Then launch browser with: http://localhost:4001/
Run below command for other than 4200
ng serve --port 4500
The location for port settings has changed a couple of times.
Change angular-cli.json
{
"defaults": {
"serve": {
"host": "0.0.0.0",
"port": 5000
}
}
}
Change angular.json
"projects": {
"project-name": {
...
"architect": {
"serve": {
"options": {
"host": "0.0.0.0",
"port": 5000
}
}
}
...
}
}
Run the command
ng serve --host 0.0.0.0 --port 5000
The code worked for me was as follows
ng serve --port ABCD
For Example
ng serve --port 6300
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.