Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/serviejs/servie-http
Servie transport for HTTP(s)
https://github.com/serviejs/servie-http
handler http https nodejs server servie
Last synced: 8 days ago
JSON representation
Servie transport for HTTP(s)
- Host: GitHub
- URL: https://github.com/serviejs/servie-http
- Owner: serviejs
- License: other
- Created: 2017-03-15T03:10:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:30:43.000Z (about 1 year ago)
- Last Synced: 2024-12-14T21:11:08.944Z (21 days ago)
- Topics: handler, http, https, nodejs, server, servie
- Language: TypeScript
- Size: 701 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Servie Http
[![NPM version](https://img.shields.io/npm/v/servie-http.svg?style=flat)](https://npmjs.org/package/servie-http)
[![NPM downloads](https://img.shields.io/npm/dm/servie-http.svg?style=flat)](https://npmjs.org/package/servie-http)
[![Build status](https://img.shields.io/travis/serviejs/servie-http.svg?style=flat)](https://travis-ci.org/serviejs/servie-http)
[![Test coverage](https://img.shields.io/coveralls/serviejs/servie-http.svg?style=flat)](https://coveralls.io/r/serviejs/servie-http?branch=master)> Servie transport for HTTP(s).
## Installation
```
npm install servie-http --save
```## Usage
```ts
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 4000servie-http --help
```## TypeScript
This project is written using [TypeScript](https://github.com/Microsoft/TypeScript) and publishes the definitions directly to NPM.
## License
Apache 2.0