function createMiddleware(middleware) {
  return (req, res, next) => {
    Promise.resolve(middleware(req, res)).then(() => next(), (error) => next(error));
  };
}
export {
  createMiddleware
};
//# sourceMappingURL=create-middleware.js.map
