micro-methods

1.0.0 • Public • Published

micro-methods

NPM Travis Codecov Greenkeeper badge David David Dev

Handle a request based on the request method.

Installing

# npm 
npm install -s micro-methods
 
# yarn 
yarn add micro-methods

Usage

import methods from 'micro-methods'
 
export default methods({
  GET(req, res) {
    // this function will serve GET requests
  },
  async POST(req, res) {
    // this function will serve POST requests
  },
})

Readme

Keywords

Package Sidebar

Install

npm i micro-methods

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.79 kB

Total Files

6

Last publish

Collaborators

  • call-a3