Update api/index.js to add a router for paths routes