https://github.com/jchip/fastify-stream-sample
Fastify streaming sample
https://github.com/jchip/fastify-stream-sample
Last synced: 2 months ago
JSON representation
Fastify streaming sample
- Host: GitHub
- URL: https://github.com/jchip/fastify-stream-sample
- Owner: jchip
- Created: 2019-03-04T22:22:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T23:05:53.000Z (over 7 years ago)
- Last Synced: 2025-03-13T11:18:06.152Z (over 1 year ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fastify-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] -
- [koa] -
- [express] -
# 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/
[koa]: https://koajs.com/
[express]: https://expressjs.com/