How to change angular port from 4200 to any other

后端 未结 29 1766
心在旅途
心在旅途 2020-12-04 05:59

I want to use 5000 instead of 4200.

I have tried to create a file on root name ember-cli and put JSON according to the code below:

{
   &q         


        
29条回答
  •  無奈伤痛
    2020-12-04 06:08

    It is not recommended to change in node modules as updates or re-installation may remove those changes. So better to change in angular cli

    Angular 9 in angular.json

    {
        "projects": {
                "targets": {
                    "serve": {
                        "options": {
                             "port": 5000
                         }
                    }     
                }     
        }
    }  
    

提交回复
热议问题