Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot register middleware (or configure) server on runtime/react #137

Open
ash-m opened this issue Apr 14, 2023 · 0 comments
Open

Cannot register middleware (or configure) server on runtime/react #137

ash-m opened this issue Apr 14, 2023 · 0 comments

Comments

@ash-m
Copy link
Contributor

ash-m commented Apr 14, 2023

The runtime/react instantiates an HttpServer for you which is where one would define middleware. Can we abstract this in a decent way? Maybe we can add an optional $middlewares argument to getRunner().

Or something a bit more long-term for people that want to tweak it different ways, perhaps there's a way were we can just extend the ServerFactory to use an HttpServer we configure. Not sure how that would work though. Maybe replace new HttpServer with $this->getHttpServer(), return a new one by default, or whatever the user decided if we've registered that class somehow... perhaps as an option argument to getRunner().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant