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
I am trying to access app.config that is exposed by slay inside of a middleware, but it doesn't exist. Express exposes both req.app and res.app for this purpose.
Example:
// foo-middleware.jsmodule.exports=foo(req,res,next){// req.app exists// req.app.config does not existnext();}
Investigation
This reference is not updated in slay, and does not have a reference to the new app properties that are documented.
req.app and res.app seem to be set on the prototype of express's app as a re-writable property. Happy to open up a PR to change this in slay, unless there is another way to access the slay app instance from inside of a middleware. (to get access to app.config, for example). This should work by setting app.request.app = app (the slay app instead of the express app).
It looks like slay and broadway inherit properties from express, but don't update this app.request.app reference.
The text was updated successfully, but these errors were encountered:
Problem
I am trying to access
app.config
that is exposed by slay inside of a middleware, but it doesn't exist. Express exposes bothreq.app
andres.app
for this purpose.Example:
Investigation
This reference is not updated in slay, and does not have a reference to the new app properties that are documented.
req.app
andres.app
seem to be set on the prototype of express's app as a re-writable property. Happy to open up a PR to change this in slay, unless there is another way to access the slay app instance from inside of a middleware. (to get access to app.config, for example). This should work by settingapp.request.app = app
(the slay app instead of the express app).It looks like
slay
andbroadway
inherit properties from express, but don't update thisapp.request.app
reference.The text was updated successfully, but these errors were encountered: