someApprentice / Crypter

3 stars 1 forks source link

Wait for Express 5 for build-in async/await handler #12

Closed someApprentice closed 4 years ago

someApprentice commented 5 years ago

For now any async controller function is implemented through dirt fix.

const asyncHandler = fn => (req, res, next) => {
  return Promise
    .resolve(fn(req, res, next))
    .catch(next);
};

This is has to be done by Express build-in handler.

expressjs/express#2237

someApprentice commented 4 years ago

Closed due switch to PHP.