[英]How to change the port for the npm run watch?
我正在尝试使用npm run watch
开发。 但是它移到了http:// localhost:3000而不是http:// localhost:8080 。 如何将此端口3000更改为8080? 因为我在8080端口中使用Tomcat服务器。
[BS] Proxying: http://localhost:8080
[BS] Access URLs:
-----------------------------------------------------------------------
Local: http://localhost:3000/server1/demo3/index.html
External: http://192.168.126.1:3000/server1/demo3/index.html
-----------------------------------------------------------------------
UI: http://localhost:3001
UI External: http://192.168.126.1:3001
-----------------------------------------------------------------------
更新bs-config.json文件:
例如:
{
"port": 8000,
"files": ["./src/**/*.{html,htm,css,js}"],
"server": { "baseDir": "./src" }
}
但是在angular2-cli的情况下,您需要提供如下的port参数:
ng serve --port 8000
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.