shishy
shishy

Reputation: 817

How to ensure that node.js script on EC2 instance restarts if it ever crashes?

I have a node.js script that is streaming in 1% Twitter data real-time into my S3 bucket. This script is on my EC2 instance and run using forever to ensure that it just runs on the EC2 instance non-stop remotely.

I noticed sometimes that the stream will stop randomly; this might be a dumb question but how do I ensure that if the code stops, that it automatically restarts without me having to check?

Thanks!

Upvotes: 0

Views: 70

Answers (1)

kjonsson
kjonsson

Reputation: 2799

You can use something like Upstart on ubuntu. Some ideas are here

Upvotes: 1

Related Questions