0.0.1 • Published 10 years ago

update_from_github v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago
update_from_github

Nodejs module for updating app from its GitHub repo

This module checks ./tmp/version/ver.json in your app (local and in GitHub repo) and updates local copy if versions mismatch.

ver.json structure is simple:

{
  "app":"0.001"
}

In your NodeJS app just require and init with options like:

var updater=require("update_from_github");
updater.start({
	user: "Zeipt",
	project: "update_from_github_test",
	interval: 4900,
	debug: true
});

setTimeout(function(){updater.stop();},5000);//use updater.stop if needed

File ./tmp/version/ver.json in your local copy will be updated last, so you can monitor this and restart your app if needed.

Here is simple demo project - just download, make some changes in test.js, change local ./tmp/version/ver.json and start test.js. After finish of updating you will lose all your local changes.

TODO: "ignore", "chmod" options.