You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NodeJS is a single threaded system - so every request gets lives in its own scope. There wouldn't be a way to leak across requests. That said, if it makes more sense to pass the tenant id through mutating the incoming request object, there's no harm that I can see.
In Lab2/Part3 a global var is used to store tenantId for incoming requests. Not sure how that would work with multiple requests in flight.
aws-saas-factory-bootcamp/Lab2/Part3/product-manager/server.js
Lines 22 to 36 in b530405
A better way would be to store this on the request object, see example: https://expressjs.com/en/guide/writing-middleware.html (under "Middleware function requestTime")
The text was updated successfully, but these errors were encountered: