Set default host and port for ng serve in config file

后端 未结 12 2225
庸人自扰
庸人自扰 2020-12-07 07:53

I want to know if i can set a host and a port in a config file so I don\'t have to type

ng serve --host foo.bar --port 80

instead of just

12条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 08:24

    Another option is to run ng serve command with the --port option e.g

    ng serve --port 5050 (i.e for port 5050)

    Alternatively, the command: ng serve --port 0, will auto assign an available port for use.

提交回复
热议问题