title: Any ways to auto restart app when it crashes?
body: <p>The problem with my webapp is, for some reason it just creashes once in a week or two. When I see in the morning, the app is already down for 6 to 8 hours. While I'm on to find the cause and fix it, I just dont want any downtime in case of unexpected crashes.</p>
  <p>What is the best way to achieve this?</p>
  <p>It's a node + express server. Running on ubuntu 18.04 in aws ec2 t2.micro instance</p>
  <p>Some solutions that hit me are :</p>
  <ol>
  <li><p>Run the app inside an infinite loop either from node itself or from a shell file.</p>
  </li>
  <li><p>Run it as a service with Restart=Always</p>
  </li>
  </ol>
  <p>I'm looking for the easiest and the most reliable way.</p>