https://github.com/jchip/koa-stream-sample
koa streaming sample
https://github.com/jchip/koa-stream-sample
Last synced: 6 months ago
JSON representation
koa streaming sample
- Host: GitHub
- URL: https://github.com/jchip/koa-stream-sample
- Owner: jchip
- Created: 2019-03-04T06:33:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T23:13:31.000Z (over 7 years ago)
- Last Synced: 2025-01-20T07:26:00.464Z (over 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# koa-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
- [Hapi] -
- [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
[hapi]: https://hapijs.com/
[express]: https://expressjs.com/
[fastify]: https://www.fastify.io/