how to restart node application automatically on aws elastic-beanstalk

前端 未结 6 973
后悔当初
后悔当初 2021-02-01 19:34

I have googled this question for a while but can\'t find the answer. My question is while deploying the nodejs application on aws elastic-beanstalk servers, I want the nodejs ap

6条回答
  •  情话喂你
    2021-02-01 20:28

    I've confirmed (as of Mar 11, 2015) that EB does indeed restart node for you.

    To confirm, I added a hidden query param to my app:

    if (req.query.testcrash == 'true') {
        setTimeout(function(){
            undefined.crashMe();
        }, 100);
    }
    

    Then verified in the log that the exception happened, and that my app was restarted.

    For reference:

    • My EB/EC2 config is "64bit Amazon Linux 2014.09 v1.0.9 running Node.js"
    • Using nginx and node 0.10.31

提交回复
热议问题