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
- Host: GitHub
- URL: https://github.com/xdk78/hayai
- Owner: xdk78
- Created: 2018-03-12T11:07:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-29T11:15:12.000Z (almost 8 years ago)
- Last Synced: 2025-02-05T06:23:30.104Z (about 1 year ago)
- Topics: fast, framework, http, javascript, nodejs, router, server, turbo-http, typescript, webframework
- Language: TypeScript
- Homepage:
- Size: 121 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# [WIP] hayai [](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)
```