micro-base-apis

1.0.0 • Public • Published

Micro Base APIs

Define a set of basic apis for a Zeit Micro service.

Installation

npm i -S micro-base-apis

Usage

Apply this hoh (high order handler)

const baseApis = require('micro-base-apis')

const myHandler = async (req, res) => {
  ...
}

module.exports = baseApis()(myHandler)

APIs

  • GET /ping => 'pong'
  • GET /info => {timeString, time, hostname, pid, ips}

License

ISC

Readme

Keywords

none

Package Sidebar

Install

npm i micro-base-apis

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • zhaoyao91