angular-cli修改端口號

找到node_modules/angular-cli/lib/config/schema.json
default值就是默認(rèn)的端口

"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
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,506評論 19 139
  • 一、解決被墻的問題 方法1:設(shè)置代理 npm config set proxy=http://127.0.0.1:...
    chenhongbinjs閱讀 3,313評論 4 48
  • Spring Boot 參考指南 介紹 轉(zhuǎn)載自:https://www.gitbook.com/book/qbgb...
    毛宇鵬閱讀 47,255評論 6 342
  • Angular CLI 是什么? Angular CLI 是一個命令行接口(Command Line Interf...
    semlinker閱讀 4,325評論 0 39
  • 如果能夠以原則為基礎(chǔ),以第二類事務(wù)為生活中心,對一個星期內(nèi)的事務(wù)進(jìn)行具體安排,將有助于更好地理解第四代時間管理的原...
    Fly_Catkin閱讀 291評論 0 0

友情鏈接更多精彩內(nèi)容