How and what to deploy Angular2 to IIS

后端 未结 7 2102
野趣味
野趣味 2020-12-24 03:30

Take for instance angular2-quickstart. What files need to be deployed and what settings need to be set to launch this web app from IIS?

This is a Typescript tutoria

7条回答
  •  遥遥无期
    2020-12-24 04:09

    The webapp itself needs no server intelligence, as it is just static files - web assets ( *.js, *.html files etc). The static files are what angular2-quickstart generates as output of its build process, which you run in your dev environment (probably locally on your personal computer). The dev environment will need node (+ npm). And infact, you can test this tutorial on your local dev environment without the need for any external server.

    edit: If u look in the package.json u can see it has lite-server:

      "scripts": {
        "start": "npm run lite",
        "lite": "lite-server"
      },
    

    Lite server is a small server that simulates a simple (web) file server.

    Lightweight development only node server that serves a web app, opens it in the browser, refreshes when html or javascript change, injects CSS changes using sockets, and has a fallback page when a route is not found.

    To give you an answer, to serve your app with IIS, you only need http://docs.asp.net/en/latest/fundamentals/static-files.html

提交回复
热议问题