implemented generic javascript routes creation