server push middleware for koa w/ manifest support
also holds true for the readme. it is very sparse right now.
npm install koa-h2-man-pusher --save
Type: string
Default: .
Root path to read from.
Type: string
Default: push_manifest.json
Path to your http2-push-manifest.
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);
MIT