index.js updated to handle orderdetails/:id