Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.1 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.1 KB

Servie Http

NPM version NPM downloads Build status Test coverage

Servie transport for HTTP(s).

Installation

npm install servie-http --save

Usage

import { createServer } from 'http'
import { createHandler } from 'servie-http'
import { get } from 'servie-route'

const handler = createHandler(get('/test', (req) => {
  return new Response({ statusCode: 200 }))
})

createServer(handler).listen(3000)

CLI

servie-http -f index.js -p 4000

servie-http --help

TypeScript

This project is written using TypeScript and publishes the definitions directly to NPM.

License

Apache 2.0