July 2017
Intermediate to advanced
402 pages
9h 38m
English
Since we started the node application manually in the terminal, closing the ssh connection or hitting Ctrl + C on the keyboard will stop the node process, and therefore our Hello World application will not work anymore.
Amazon Linux, unlike standard Red Hat-based distributions, comes with a system called Upstart.
It is fairly easy to use and provides a couple of extra features that traditional System V bootup scripts don't have, such as the ability to respawn a process that died unexpectedly. To add an Upstart configuration, you need to create a file inside /etc/init on the EC2 instance.
Here is the code to insert in /etc/init/helloworld.conf:
description "Hello world Deamon" # Start when ...
Read now
Unlock full access