它是一个共同的选择到AngularJS应用程序部署到香草的Apache HTTP服务器? [英] Is it a common choice to deploy an AngularJS app to a vanilla Apache HTTP server?

查看:119
本文介绍了它是一个共同的选择到AngularJS应用程序部署到香草的Apache HTTP服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很好奇什么样的服务器的应用程序AngularJS通常被部署到,而谷歌没有给出一个满意的答复。尤其是,在我看来,一个AngularJS应用程序只是一个静态文件的收集,那么,这通常只部署这样一个应用到生产香草的Apache HTTP服务器?或者是重量轻的Node.js服务器preferred?

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 AngularJS app is just a collection of static files, so is it common to just deploy such an app into a vanilla Apache HTTP server in production? Or is a light-weighted Node.js server preferred?

非常感谢你。

推荐答案

我nginx的运行提供静态内容AngularJS。后端功能由的NodeJS服务器,提供所有必要的动态内容和答案REST从客户端请求提供服务。 Nginx的路由动态查询到的NodeJS,并直接提供静态内容。在这两方面,客户端和服务器端逻辑上写的是同一种语言(JavaScript或CoffeeScript的)。

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.

上部署AngularJS主题的​​一些其他职位:

Some other posts on the subject of deploying AngularJS:


  • 请不要运行在生产中咕噜服务器':<一href=\"http://stackoverflow.com/questions/22577336/can-grunt-server-use-for-production-application-deployment\">can咕噜服务器使用生产应用程序部署

  • 运行的Apache / Nginx的生产:<一href=\"http://stackoverflow.com/questions/21745529/best-way-for-deploy-angular-js-application-made-with-yeoman\">Best对于这样部署自耕农提出申请angular.js?

  • 托管服务器/客户端一起:<一href=\"http://stackoverflow.com/questions/19984830/the-best-deployment-architecture-for-angularjs-nodejs-app\">The对于angularjs应用的NodeJS
  • 最好的部署架构
  • 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

这篇关于它是一个共同的选择到AngularJS应用程序部署到香草的Apache HTTP服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆