add js-routes for rails-like routing in javascript