Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/watchify-request
Wraps a watchify instance into an HTTP request handler
https://github.com/hughsk/watchify-request
Last synced: 12 days ago
JSON representation
Wraps a watchify instance into an HTTP request handler
- Host: GitHub
- URL: https://github.com/hughsk/watchify-request
- Owner: hughsk
- License: other
- Created: 2014-10-01T20:23:22.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-05T02:54:52.000Z (about 8 years ago)
- Last Synced: 2024-10-17T16:39:16.117Z (22 days ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# watchify-request [![experimental](http://badges.github.io/stability-badges/dist/experimental.svg)](http://github.com/badges/stability-badges)
Wraps a [watchify](http://github.com/substack/watchify) instance into an HTTP
request handler, performing the minimal amount of rebundling required and
pausing requests mid-build to avoid getting old versions of your script on
reload.## Usage
[![NPM](https://nodei.co/npm/watchify-request.png)](https://nodei.co/npm/watchify-request/)
### `handler = watchifyRequest(bundler)`
Creates a request handler out of a `watchify` or `browserify` instance.
### `handler(req, res[, done])`
Handles the request, where `req` is an `HTTPRequest` instance and `res` is its
matching `HTTPResponse` instance. `done(err, body)` is optional, and called if
you want to add a custom error handler or manipulate the request after
`browserify` is done.## See also
- [myth-request](https://github.com/yoshuawuyts/myth-request)
- [koa-watchify](https://github.com/yoshuawuyts/koa-watchify)## License
MIT. See [LICENSE.md](http://github.com/hughsk/watchify-request/blob/master/LICENSE.md) for details.