Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript XSLT CSS Ruby Other
branch: master
Failed to load latest commit information.
config linting, removed repeated key
cookbooks removed osx finder files
lib setting high query limit for the arcnav titles - fixes #74
test support multiple contact details (closes #38)
views removing logos
xsl have the xsl for generating csv docs
.gitignore moved over to less, ignore css in git
Guardfile updated Guardfile tests to look for coffee files
Procfile renamed app.js for heroku
Vagrantfile Cleaned up tabs, comments etc. datafile now included in snapshot
clearcache.js added way of clearing cache (closes #29)
codelists.js added policy markers widget
package.json added node .8 gotcha to the readme
web.js display correct number of funders on the homepage - fixes #76
widgets.js Fixed error with contact details widget

Aid View

Running development insight

Requires node (~0.8) + npm.

# install npm dependencies
npm install 

# run the app
node web.js

The default endpoint is - if you want to change this, set the ENDPOINT environment variable:

# run the app with a custom endpoint
ENDPOINT=http://my-custom/endpoint? node web.js

# run the app with a custom corpus
CORPUS=fullA node web.js


Error: Cannot find module 'node_xslt'

The xslt module won't work with node >0.10 - easiest fix is to use nvm and downgrade to 0.8.


This project can be run on a virtual machine using Vagrant

gem install vagrant
vagrant box add base
vagrant up

# (in the gui launched by virtual box)
/etc/init.d/networking restart

# when ssh-ed into virtual machine
cd /vagrant && node web.js

Note. this will tunnel port 3000 on the virtual box -> 3003 on localhost


This app can be deployed to heroku

heroku create --stack cedar
git push heroku develop:master

# make the app run in production mode
heroku config:add NODE_ENV=production

# to set a custom api endpoint (remember the trailing question mark)
heroku config:add ENDPOINT=

# to set the corpus used
heroku config:add CORPUS=fullA

# to rename for a nicer url
heroku apps:rename my-iati-app

NOTE currently the compiled js are given a url based on the app startup time, this is the only inhibitor to the app being assigned to multiple dynos (also, for browser caching effectiveness across restarts)

API Request Caching

Requests to the api can be cached, which is very recommended (even in development)


Responses from the api can be cached using memcached by setting the env variable MEMCACHE_SERVERS:


This won't work on heroku as yet (because the memcached is user/pass protected) - though can help with local development.

(note, to clear memcached: echo "flush_all" | nc localhost 11211 )


Redis can also be used to cache requests, to enable the redis add-on on heroku (and caching on the app):

heroku addons:add redistogo

And to use redis locally

REDISTOGO_URL=redis://user:pass@url:port/ node web.js

(interestingly, you can use the redistogo url from your heroku app, run heroku config to find it)

…Just now - there isn't a good option for cache expiry, but removing and adding the add-on should do the trick.

There is a script that will expire the redis cache, this can be run on heroku using:

heroku run node clearcache.js --app aidview


Google analytics can be enabled by setting the GA_ACCOUNT variable



Aidview is hosted on heroku, the appname is 'aidview'. The account is owned by, benfoxall is also be able to grant access.

Something went wrong with that request. Please try again.