Middleware on Server without root controller
Closed this issue · 6 comments
Is it possible to declare once that you want the middleware to apply to every route you make on a server, not just a controller? I don't have a root controller so the answer in #43 does not help in this case.
I'd be happy to contribute a PR for this if it doesn't exist yet.
As I wrote on the last issue, this can be achieved using this.app.use(...)
on the server. Does this answer the question?
@thekevinbrown did @joeykilpatrick answer solve the issue. I'd like to close this issue.
Hey @seanpmaxwell, no it doesn't solve the issue. Everything in Overnight can be done directly on Express. This is a feature request to make this possible in Overnight.
Okay so it's a new feature request, it wouldn't be large, just a few extra lines of code to the addControllers()
method. I might add that this weekend or something. I'll close the issue when it's done.
Awesome, that'd be great!
Done. Version 1.6.15 now takes a global middleware as the third argument in super.addControllers