Skip to content

toExpressMiddleware

function toExpressMiddleware(fetch, options?): ExpressMiddleware;

Defined in: src/adapters/express.ts:49

Serve a fetch handler from Express. Errors go to next(error).

Use with app.use(path, middleware): the panel sees req.originalUrl, so set its basePath to the mount path.

Parameter Type
fetch FetchHandler
options? ExpressMiddlewareOptions

ExpressMiddleware