update generating routes in javascript