httpListener
config.logger$
middleware should log request URL's conditionally. To achieve this behavior we can make our middleware function curried, where the last returned function should conform toHttpMiddlewareEffect
interface.req.res.send
method which allows to send an HTTP response using the same common interface that we use for sending a response inside API Effects. The mentioned method returns an empty Observable (Observable that immediately completes) as a result, so it can be composed easily inside a middleware pipeline.httpListener
configuration object),combineRoutes
function),use
operator is deprecated. Apply middlewares directly to the effect Observable chain. The operator will be deleted in the next major version (v5.0).authorize$
middleware can look like in the following snippet:combineRoutes()
function.httpListener
. In this case the middleware will operate on each request that goes through your HTTP server.httpListener
and combineRoutes
matters - middlewares are run sequentially (one after another).