Generate api route in app.js