An express middleware that implements server push in HTTP2.
npm install h2-server-push --save
Note: Requires node-spdy
for HTTP2
const hsp = require('h2-server-push');
const registerParser = hsp('public');
app.get('/', registerParser, (req, res) => {
res.sp('index.html', 'public')
});
MIT