jinjor · GitHub

I wrote simple Express app and got an error.

var fs = require('fs');
var express = require('express');
var app = express();
app.get('/', function (req, res) {
  res.send('hello!')
})
var options = {
  key: fs.readFileSync('./ssl/key.pem'),
  cert: fs.readFileSync('./ssl/cert.pem')
};
require('http2').createServer(options, app).listen(8080);
// require('https').createServer(options, app).listen(8080);// https module works well
_stream_readable.js:505
    dest.end();
         ^
TypeError: undefined is not a function
    at Stream.onend (_stream_readable.js:505:10)
    at Stream.g (events.js:199:16)
    at Stream.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

Is that a node-http2's matter or Node's one?
It is hard to debug for me...

Node: v0.12.0
node-http2: v3.2.0
express: v4.11.2

Read the original on github.com ↗