https://github.com/jchip/express-stream-sample
express streaming sample
https://github.com/jchip/express-stream-sample
Last synced: 6 months ago
JSON representation
express streaming sample
- Host: GitHub
- URL: https://github.com/jchip/express-stream-sample
- Owner: jchip
- Created: 2019-03-04T06:09:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-04T23:12:34.000Z (over 7 years ago)
- Last Synced: 2025-01-20T07:26:04.513Z (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
# express-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] -
- [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/
[koa]: https://koajs.com/
[fastify]: https://www.fastify.io/