New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

micro-methods

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-methods

A utility package which allows you to clean up before node exits

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
4
300%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

micro

FAQs

Package last updated on 19 Nov 2019

Related posts