(fn)
| 77 | // Catch unhandled promise rejections and passing them to Express's error handler |
| 78 | // https://medium.com/@Abazhenov/using-async-await-in-express-with-node-8-b8af872c0016 |
| 79 | const asyncMiddleware = (fn) => (req, res, next) => { |
| 80 | Promise.resolve(fn(req, res, next)).catch(next) |
| 81 | } |
| 82 | |
| 83 | export default function (app) { |
| 84 | // *** Request connection management *** |