A decorator for use with micro to handle requests differently depending on HTTP method
MIT License
Handle a request based on the request method.
# npm
npm install -s micro-methods
# yarn
yarn add micro-methods
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
},
})