= require('express'); const http2 = require('http2'); const fs = require('fs'); const options = { key: fs.readFileSync(__dirname + '/my.key'), cert: fs.readFileSync(__dirname + '/my.cert') }; const app = express(); app.use(express.static(__dirname + '/views')); app.use(express.static(__dirname + '/mjs', { setHeaders: (res, path, stat) => { res.header('Content-Type', 'application/javascript'); } })); http2.createSecureServer(options, app).listen(8080);