Has anyone been successful deploying a node (express) app with Amazon OpsWorks?

前端 未结 5 1837
生来不讨喜
生来不讨喜 2021-02-05 14:40

As the title suggested, I\'ve been playing around deploying apps with Amazons new OpsWorks management system, however I haven\'t been able to figure out how to get the node serv

5条回答
  •  名媛妹妹
    2021-02-05 15:33

    I played around this for a bit as well and hopefully my path to success will help someone. Node.js usually needs elevated privileges to run on port 80 so I discovered that while naming the sample app app.js was fine, you need to modify line 2 of the default OpsWorks Node.js deploy chef recipe to use sudo:

    • AWS Original: https://github.com/aws/opsworks-cookbooks/blob/master/opsworks_nodejs/templates/default/node_web_app.monitrc.erb#L2

    • Modified: https://github.com/nationalfield/opsworks-cookbooks/blob/master/opsworks-nodejs/templates/default/node_web_app.monitrc.erb#L2

提交回复
热议问题