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
  },
})

/micro-methods/

    Package Sidebar

    Install

    npm i micro-methods

    Weekly Downloads

    6

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.79 kB

    Total Files

    6

    Last publish

    Collaborators

    • call-a3