0

How to integrate http2 with ExpressJS using nodejs module http2?

var app = express();
import http2 from 'http2';
const server = http2.createSecureServer({
  key: fs.readFileSync('server.key'),
  cert: fs.readFileSync('server.crt')
}, app);

Error:

server.ts:23:4 - error TS2345: Argument of type 'Express' is not assignable to parameter of type '(request: Http2ServerRequest, response: Http2ServerResponse) => void'.
Kok How Teh
  • 3,298
  • 6
  • 47
  • 85

0 Answers0