重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

angular-cli修改端口号【angular2】

找到node_modules/angular-cli/lib/config/schema.json

专注于为中小企业提供成都网站建设、成都网站设计服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业林芝免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上千余家企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

default值就是默认的端口

"serve": {
 "description": "Properties to be passed to the serve command",
 "type": "object",
 "properties": {
  "port": {
  "description": "The port the application will be served on",
  "type": "number",
  "default": 4200
  },
  "host": {
  "description": "The host the application will be served on",
  "type": "string",
  "default": "localhost"
  }
 }
 }
}

也可以通过命令行方式修改,如:

ng serve --port 4201

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,同时也希望多多支持创新互联!


标题名称:angular-cli修改端口号【angular2】
路径分享:http://cqcxhl.com/article/gedsgd.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP