ma

micro-access

Easy CORS handling for micro

Showing:

Popularity

Downloads/wk

11

GitHub Stars

38

Maintenance

Last Commit

4yrs ago

Contributors

0

Package

Dependencies

1

Size (min+gzip)

0.5KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

micro-access Build Status

Easy CORS handling for micro

Install

$ npm install micro-access

Usage

const {json, send} = require('micro');
const microAccess = require('micro-access');

module.exports = microAccess()(async (req, res) => {
    const body = await json(req);
    send(res, 200, body);
});

API

microAccess([options])(handler)

options

Type: Object

Same as control-access.

handler

Type: Function

The request handler to wrap.

License

MIT © Kevin Mårtensson

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial