Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create self-updating Node.js application?

Tags:

node.js

I have a single application that is ran on n amount of servers in any given configuration (say some behind NAT etc.), thus direct push update is not really viable option.

I was planning to build an self-updater into the application, so that every instance could download the new version from, say S3, and update themselves.

What would be the best way to approach this?

like image 446
crappish Avatar asked Jan 18 '12 22:01

crappish


1 Answers

You can use always together with curl (or something similar for s3, for example the s3cmd) and unzip. Just download the file automatically, unzip it and always restarts it if necessary.

like image 56
topskip Avatar answered Oct 21 '22 13:10

topskip