1.0.0 • Published 7 years ago

micro-base-apis v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

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