https://github.com/jchip/hapi-stream-sample
Hapi 17+ Streaming Sample
https://github.com/jchip/hapi-stream-sample
Last synced: 9 months ago
JSON representation
Hapi 17+ Streaming Sample
- Host: GitHub
- URL: https://github.com/jchip/hapi-stream-sample
- Owner: jchip
- Created: 2019-03-02T16:15:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T23:11:33.000Z (over 7 years ago)
- Last Synced: 2025-01-20T07:26:01.876Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hapi-stream-sample
Install [fyn].
```bash
$ fyn
$ fun start
```
## routes
- `http://localhost:3000` - return streaming response
- `http://localhost:3000?fail=2` - cause a failure on 2nd streaming chunk
- `http://localhost:3000/multi` - send back multiple streams in response
> Note in `multi`, both streams were produced concurrently, so the second one show up in one go after the first one's streamed.
## Others
- [Koa] -
- [express] -
- [fastify] -
# License
Licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
---
[fyn]: https://www.npmjs.com/package/fyn
[koa]: https://koajs.com/
[express]: https://expressjs.com/
[fastify]: https://www.fastify.io/