Dynamic-like Express routing for dynamic-object to print
up vote 0 down vote favorite I'm sending an object back to express that needs to be printed via escpos (for a thermal printer on Ubuntu 18). My front end server is react. I need to print 'receipts' for information that can be of a variety of object after the first set of variables date name customer name customer phone [array of objects] I can create a route for the first set of vars router.post('/printer/:date/:name/:custName/:custPhone/', function(req,res,next) { But is it possible to add to that route dynamically for object that can be various such as: type: 'pizza', drinks : '2' or extra : 'garlic bread' I current send the data back like this in the front end: axios.post('/api/printer/' + newDate + '/' + userName + '/' + selectedCustomerName + '/' + selectedCustomerPhone) I've considered posting such as this: axios.post('/api/printer', name : userName, date : newDate, customerN...