如何将角度端口从 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:
I have tried to create a file on root name ember-cli
and put JSON according to the code below:
{
"port": 5000
}
但我的应用程序仍然运行在 4200 而不是 5000
But my app still runs on 4200 instead of 5000
推荐答案
对我有用的解决方案是
The solution worked for me was
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屋!
查看全文