basing the javascript on the routes.json file, leaving hard coding to the tests