如何将角形端口从4200更改为其他端口 [英] How to change angular port from 4200 to any other
本文介绍了如何将角形端口从4200更改为其他端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用5000而不是4200 ..
I want to use 5000 instead of 4200 ..
我尝试的是我已经创建了一个根名称为ember-cli
的文件,并根据以下代码放置了JSON:
What i have tried is i have created a file on root name ember-cli
and put JSON according to the code below:
{
"port": 5000
}
但是我的应用仍然可以在4200而不是5000上运行
But my app still run on 4200 instead of 5000
推荐答案
对我有用的解决方案是
ng serve --port 4401
(您可以将4401更改为所需的任何数字)
(You can change 4401 to whatever number you want)
然后启动浏览器-> http://localhost:4401/
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.
这篇关于如何将角形端口从4200更改为其他端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文