How can I automatically start a node.js application in Amazon Linux AMI on aws?

前端 未结 8 975
轻奢々
轻奢々 2020-12-07 16:44

Is there a brief guide to explain how to start up a application when the instance starts up and running? If it were one of the services installed through yum th

8条回答
  •  伪装坚强ぢ
    2020-12-07 17:25

    You can use screen. Run crontab -e and add this line:

    @reboot  screen -d -m bash -c "cd /home/user/yourapp/; node app"
    

提交回复
热议问题