Update route and api.js script file.