1.0.5 • Published 7 years ago

h2-server-push v1.0.5

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

h2-server-push

An express middleware that implements server push in HTTP2.

Installation

npm install h2-server-push --save

Note: Requires node-spdy for HTTP2

Usage

const hsp = require('h2-server-push');

const registerParser = hsp('public');

app.get('/', registerParser,  (req, res) => {
    res.sp('index.html', 'public')
});

License

MIT