0.1.2 • Published 7 years ago

koa-h2-man-pusher v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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

npm install koa-h2-man-pusher --save

usage

const spdy = require('spdy');
const Koa = require('koa');
const manpush = require('koa-h2-man-pusher');

const app = new Koa();

app.use(manpush.manifestor({ manifest: 'manifest.json' }));
app.use(manpush.push());

const server = spdy.createServer({ key: 'path/to/ssl.key', cert: 'path/to/ssl.crt' }, app.callback());

server.listen(3000);

copyright

MIT