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: 5 months 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 (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-12-12T07:30:43.000Z (over 2 years ago)
- Last Synced: 2025-01-28T15:18:18.270Z (about 1 year 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
[](https://npmjs.org/package/servie-http)
[](https://npmjs.org/package/servie-http)
[](https://travis-ci.org/serviejs/servie-http)
[](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 4000
servie-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