HTTP/2 auto push library using express
npm install express-auto-push
isPathStatic must be false (default: false). And must be relative from the base of the project folder (where node_modules) folder is present.
isPathStatic must be true.
javascript
import express from 'express';
import http2 from 'http2';
import expressAutoPush from 'express-auto-push';
const app = express();
app.use(expressAutoPush({rootDir: '/static'}));
const server = http2.createSecureServer(app);
server.listen(3000, () => {
console.log('server up and running on 3000');
});
``