This is a NodeJS app that polls github for ZK commits, and calculates balance changes introduced by each commit (using black magic and lua shell-outs). This information is presented in an AngularJS frontend for easy viewing
You will need:
With your tools in hand, we head to the terminal:
$ git clone https://github.com/kaen/zk-balance.git
$ cd zk-balance
$ npm install .
$ sudo npm install -g sails
If everything runs smoothly, we just need to bootstrap the Github data.
- Make sure you have
git
andgrunt
somewhere in your path - Run
grunt ingest
- Hold
Ctrl+C
to kill grunt when you get bored (pkill -9 -f node
may be necessary on slow rigs) - All set! Now type
sails lift
and go to http://localhost:1337/ to start hacking :)
To test locally in an environment identical to the production server, install Docker and simply run:
$ ./ops/run-in-docker.sh
Then use docker ps
to see which port Docker was bound to. Data is automatically refreshed in the production environment.
This project can be built statically. You will need to have grunt
and lua
somewhere in your $PATH
. You may also need to configure config/github.coffee
as shown in config/github.coffee.example
if you are fetching unit data frequently.
grunt fetch --prod
grunt static --prod
The results can be found in www/
. Due to the use of XHR, the build currently only runs behind some sort of webserver (i.e. testing via file://
will fail).
You may want to read up on the stack:
- NodeJS
- SailsJS
- AngularJS
- Twitter Bootstrap
- Waterline
- Bluebird