0.0.1 • Published 3 years ago

express-auto-async-handler v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

express-auto-async-handler

npm

automatically wrap express async function with async handlers.

Example

  const express = require('express');
  const app = express();
  const warp = require('express-auto-async-handler');

  async function a() {};

  app.get('/path1', a);
  app.all('/path4', a);
  app.use(a);
  router1.get('/path5', a);

  warp(app);
  app.listen(PORT) // or just warp(app).listen(PORT);