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

前端 未结 5 1835
生来不讨喜
生来不讨喜 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:24

    The amount of time I spent on this is embarrassing, but I will share anyway in hopes of saving other people the hours of their lives that would otherwise be stolen by Amazon.

    • To answer your question, yes, I did get my node/express application running.
    • In case you were using any kind of process.env method of choosing your port number, change your listening port to 80 (or 443 if appropriate).
    • Most importantly, Amazon doesn't care what your main file is. Rename it server.js and have it in the root directory of your application. That is the file that monit tries to run.

    Hopefully that helps. If it doesn't, or if all of that is obvious, I apologize for my silliness and blame lack of sleep. :)

提交回复
热议问题