As my node.js application is a command line application that is run by the user directly. It would make sense for it to phone the github repo and compare its local version against the lastest on the master branch on the github repo. And if the version is outdated, display a message to the user.
So how would one accomplish this phone home and compare versions?
Created a solution to do this myself. Requires the dependency bal-util (so
npm install bal-util). Here’s the code:Source code of the
packageComparefunction can be found here: https://github.com/balupton/bal-util/blob/master/src/lib/compare.coffeeCoffeeScript
JavaScript