Hosting Angular 2 app

前端 未结 5 964
心在旅途
心在旅途 2021-02-05 21:21

I\'m new to Angular 2, I know host Angular 1.x on shared hosting like GoDaddy, but I don\'t have idea how publish Angular 2 a

5条回答
  •  太阳男子
    2021-02-05 21:50

    I think that one popular workflow is to gulp-typescript your .ts files, and send the resulting .js files into a distribution folder. The many .js files could also be "gulp-concatenated" (gulp-concat) into one file.

    Of course you'll need to be sending your html and css files as well.

    Since the Angular2 library relies heavily on what's in the node_modules folder as well, you would need to upload your package.json and npm install on the server side. You could try uploading the node_modules but the upload takes a lot of time.

提交回复
热议问题