/cors-async

Primary LanguageJavaScriptMIT LicenseMIT

cors-async

Like cors but async.

API

Same as cors but returns promise instead of invoking callback.

Examples:

  const corsAsync = require('cors-async')(/* options here */);

  ...

  return corsAsync(req, res)
    .then(() => {
      // next handler
    });

License

MIT