I'd like to create an application with Node.js that periodically checks for updates and installs them if there are any.
The basic components are clear to me:
Then, there may be different strategies on when to check for updates and install updates:
The application may even be shut down hard and restarted automatically.
But there are some questions left:
data
folder for all of them?npm install
& co. for newly downloaded packages?In general: How would you try to achieve a system like this?
First, you could use NPM itself for package and app delivery. Second, you could add a script file to add a cron job in the package.json file (e.g. 'postinstall' or 'update') for a periodic update process. In this script you could check all you need like broken updates. In Heroku you can use a Scheduler Worker for update processing.