angular-cli修改端口号【angular2】

时间:2017-04-19    点击:265   

找到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

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

微信小程序 判断手机号的实现代码
微信小程序 滚动到某个位置添加class效果实现代码
jQuery ajax请求struts action实现异步刷新
vue2.0父子组件间通信的实现方法
bootstrap日期控件问题(双日期、清空等问题解决)
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved