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.
- Copy
config/github.coffee.example
toconfig/github.coffee
- Edit
config/github.coffee
to contain your github login - run
sails c
, which will print a picture of a sailboat and bring you to the SailsJS prompt. - At the prompt enter:
github.refreshGithubData()
- You should see units being loaded, followed by commit data and balance change crunching.
- Allow this to run for a bit (10-20 minutes is ideal, it may take an hour or more to complete by itself)
- Hold
Ctrl+C
to kill sails 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