An open API service indexing awesome lists of open source software.

https://github.com/xdk78/hayai

[WIP] hayai - Fast Node.js HTTP framework built on turbo-http
https://github.com/xdk78/hayai

fast framework http javascript nodejs router server turbo-http typescript webframework

Last synced: about 1 year ago
JSON representation

[WIP] hayai - Fast Node.js HTTP framework built on turbo-http

Awesome Lists containing this project

README

          

# [WIP] hayai [![Build Status](https://travis-ci.org/xdk78/hayai.svg?branch=master)](https://travis-ci.org/xdk78/hayai)

Fast Node.js HTTP framework built on turbo-http

```ts
import Hayai from './index'
const app = new Hayai()
const port: Port = 3000
app.get('/', (req: Request, res: Response, params: Params) => res.send('hello world', 200))
app.get('/json', (req: Request, res: Response, params: Params) => res.json({ hello: 'world' }, 200))
app.get('/html', (req: Request, res: Response, params: Params) => res.html('Hello World', 200))
app.get('/mime', (req: Request, res: Response, params: Params) => {
res.type('text/html')
res.end('Hello World', 200)
})
app.listen(port)
```