Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kasperlewau/koa-h2-man-pusher
server push middleware for koa w/ manifest support
https://github.com/kasperlewau/koa-h2-man-pusher
http2 http2-push koa koa-middleware server-push
Last synced: 13 days ago
JSON representation
server push middleware for koa w/ manifest support
- Host: GitHub
- URL: https://github.com/kasperlewau/koa-h2-man-pusher
- Owner: kasperlewau
- Archived: true
- Created: 2016-11-02T09:00:17.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-13T07:39:12.000Z (almost 8 years ago)
- Last Synced: 2024-09-29T12:22:58.143Z (4 months ago)
- Topics: http2, http2-push, koa, koa-middleware, server-push
- Language: JavaScript
- Size: 11.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.mdown
Awesome Lists containing this project
README
# koa-h2-man-pusher
> server push middleware for koa w/ manifest support## Note: This is an unstable WIP. Don't go prod.
> also holds true for the readme. it is very sparse right now.## Installation
```sh
npm install koa-h2-man-pusher --save
```## API
### manpusher([opts])
### opts.root
Type: `string`
Default: `.`Root path to read from.
### opts.manifest
Type: `string`
Default: `push_manifest.json`Path to your [http2-push-manifest]().
## Usage
```js
const spdy = require('spdy');
const Koa = require('koa');
const manpusher = require('koa-h2-man-pusher');const app = new Koa();
app.use(manpusher({
manifest: 'stuff/manifest.json',
root: 'dist'
}));const server = spdy.createServer({
key: 'path/to/ssl.key',
cert: 'path/to/ssl.crt'
}, app.callback());server.listen(3000);
```## Copyright
MIT