stellar-deprecated / stex

DEPRECATED. An opinionated framework built on top of expressjs used to build better web services for stellar
Other
30 stars 11 forks source link

Use continuation-local-storage to save request id #52

Closed thejollyrogers closed 9 years ago

thejollyrogers commented 9 years ago
nullstyle commented 9 years ago

I feel like we should put getNamespace() behind a helper function. Could we do something like the following sample work?

stex.cls().get("requestId")

nullstyle commented 9 years ago

:+1:

bartekn commented 9 years ago

:+1: One question: Let's say a developer wants to create a new namespace for his/her app (app is using stex). What happens when he creates a new namespace and bind it to the req and res (these are the same objects as in stex). Will it work? Maybe we should open it and allow devs to use this API?

Edit: I think it's very similar (or even the same) idea to what Scott's explained.

thejollyrogers commented 9 years ago

@nullstyle pulled in core cls stuff into cls.js @bartekn i've added a config value so that apps can provide their own namespace name

nullstyle commented 9 years ago

:+1: