Angular(2) - Running two projects with CLI

后端 未结 3 1834
半阙折子戏
半阙折子戏 2021-01-04 19:16

I was wondering if it is possible to work on two Angular(2) projects at the same time. I open my first project using ng serve and it runs on the server and when

相关标签:
3条回答
  • 2021-01-04 19:40

    Open Seconde terminal in vsCode

    ng serve --port 4210

    Change port number as you want, then open browser: localhost:[port]

    0 讨论(0)
  • 2021-01-04 19:49

    Open 2nd project then run this command:

    ng serve --port 4210
    

    Change port as you want, then open browser: localhost:[port]

    Following this section:

    https://github.com/angular/angular-cli#generating-and-serving-an-angular-project-via-a-development-server

    0 讨论(0)
  • 2021-01-04 19:52

    If you're using angular-cli, It is pretty easy :

    In console run :

    ng serve --host 0.0.0.0 --port 4201 --live-reload-port 4915
    

    For reference : https://github.com/angular/angular-cli

    0 讨论(0)
提交回复
热议问题