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().
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 togetRunner()
.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 togetRunner()
.