Is it a common choice to deploy an AngularJS app to a vanilla Apache HTTP server?

后端 未结 2 1355
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-01 05:19

I was curious about what kind of server an AngularJS app was usually deployed into, and Google didn\'t give a satisfactory answer. In particular, it looks to me that an AngularJ

2条回答
  •  无人及你
    2021-02-01 05:50

    I run nginx to serve static AngularJS content. The backend functionality is served by NodeJS server that provides all necessary dynamic content and answers REST requests from the client-side. Nginx routes the dynamic queries to NodeJS, and serves static content directly. Both, client-side and server-side logic is written in the same language (JavaScript, or CoffeeScript).

    The biggest benefit of this is that we can load-balance client-side static content and backend content separately. It depends on the size of your app and demands that it makes regarding the dynamic content access.

    Some other posts on the subject of deploying AngularJS:

    • Do not run 'grunt server' in production: can grunt server use for production application deployment
    • Run Apache/Nginx in production: Best way for deploy angular.js application made with yeoman?
    • Hosting server/client side together: The best deployment architecture for angularjs nodejs app

提交回复
热议问题