1.0.0 • Published 6 years ago
micro-methods v1.0.0
micro-methods
Handle a request based on the request method.
Installing
# npm
npm install -s micro-methods
# yarn
yarn add micro-methodsUsage
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
},
})1.0.0
6 years ago