node.js - 将 yeoman node.js 应用程序部署到 Elastic Beanstalk

标签 node.js amazon-web-services yeoman amazon-elastic-beanstalk

我有一个使用 Yeoman 生成器开发的 NodeJS 应用程序,我正在尝试将其部署到 Elastic Beanstalk 实例。我对这个堆栈相当陌生,所以如果问题看起来很分散,我很抱歉。我能够使用此过程部署我的应用程序:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_nodejs_express.html 。然而,当我点击主页时,我只有一个空白的 Node 应用程序。我猜这是因为部署直接来 self 的 Git 存储库,并且我的 Grunt 构建过程尚未运行。有没有办法告诉 Elastic Beanstalk 在收到可部署后运行 Grunt 构建?

最佳答案

您需要将 Grunt 设置为在 AWS 上使用部署 Hook 运行。这是通过 container commands 完成的.

查看这个答案:How to automatically restart delayed_job when deploying a rails project on Amazon Elastic Beanstalk?

以及此相关博客文章:http://junkheap.net/blog/2013/05/20/elastic-beanstalk-post-deployment-scripts/

关于node.js - 将 yeoman node.js 应用程序部署到 Elastic Beanstalk,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20289405/

相关文章:

node.js - 在单独的模块中定义 Mongoose 模型

javascript - Webdriver JS - 将 sendKeys 存储到变量并重用

amazon-web-services - 在aws lambda无服务器框架中使用自定义vpc而不是默认vpc

gruntjs - 配置 grunt bower-install 时遇到问题

html - Grunt 预编译内联 Markdown

asp.net-core - 无法运行使用 yeoman 生成器生成的 asp.net 核心项目

javascript - ExpressJS - URL 中不是参数的可选部分?

javascript - 允许使用 Array.from 将数据结构转换为数组

amazon-web-services - (AWS) 雅典娜 : Query Results seem too short

mysql - AWS API REST 连接到外部 MySQL 数据库