简体   繁体   English

部署由Yeoman + Grunt + AngularJS创建的项目的简便方法

[英]Easy Way to Deploy Project Created with Yeoman + Grunt + AngularJS

Huy guys, 大家好,

I'm trying to deploy my AngularJS project (created using Yeoman and Grunt) to a server. 我正在尝试将AngularJS项目(使用Yeoman和Grunt创建)部署到服务器。 Any ideas on an easy way to launch this project? 关于启动此项目的简便方法有什么想法吗? We use AWS for our backend. 我们将AWS用于后端。

Angular is just some static HTML for the most part. Angular在大多数情况下只是一些静态HTML。 So just deploy it like you'd deploy any other html. 因此,就像部署其他任何HTML一样部署它即可。

Personally, I use git for that kind of work. 就个人而言,我将git用于此类工作。 On my beta test server, I set up a remote repository and some post-commit hooks that let me do a git push beta master style deployment that rebuilds all the frontend (coffee, SASS) and backend (node) stuff. 在我的Beta测试服务器上,我设置了一个远程存储库和一些提交后的钩子,这些钩子使我可以进行git push beta master样式部署,从而重建所有前端(咖啡,SASS)和后端(节点)内容。

I'm not wild about push-to-deploy for the production site, so instead I just cloned my deployment repo to that site and manually ssh to the machine, do a git pull, rebuild everything, test everything again, and then move the generated html/css/js files to the frontend directory where nginx is serving statics. 我对生产站点的推送部署并不陌生,所以我只是将部署存储库克隆到该站点,然后手动ssh到计算机,执行git pull,重新构建所有内容,再次测试所有内容,然后移动生成的html / css / js文件到nginx提供静态信息的前端目录。 I use nginx because it also serves as a reverse proxy for the node backend, otherwise I'd probably just use a plain old apache - the frontend is all static anyway. 我使用nginx是因为它也可以用作节点后端的反向代理,否则我可能只使用普通的旧apache-前端无论如何都是静态的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM