How to allow access outside localhost

后端 未结 15 840
失恋的感觉
失恋的感觉 2020-12-07 07:25

How can I allow access outside the localhost at Angular2? I can navigate at localhost:3030/panel easily but I can not navigate when I write my IP such as

15条回答
  •  自闭症患者
    2020-12-07 08:12

    I just edit angular.json file in my project as below and it works

    ...

        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "browserTarget": "project:build",
            "host": "0.0.0.0"
          },
    

    ...

提交回复
热议问题