This express server stands up an endpoint at http://localhost:3000/promos/:userId
Example query:
Expected output: { cart: [], appliedPromos: [] }
Requirements are very minimal.
npm install
As this is expected to perform inside a distributed architecture, only calls that pass a valid userId are expected to return a valid result.
Make a GET request against the server with a valid userId via cURL or a browser.
See extensive code comments for details on architecture & design decisions.