node.js - Http2 not working with express -


i have server.js file code

var express = require('express') var app = express() var fs = require('fs'); app.get('/', function (req, res) {   res.send('hello, http2!') })  var options = {   key: fs.readfilesync('./localhost.key'),   cert: fs.readfilesync('./localhost.crt') };  require('http2').createserver(options, app).listen(8080); 

after run in shell

$ node server.js 

and server waiting, can't open it. tried http://localhost:8080 , https://localhost:8080 (i know 1 right one.). nothing going on, no errors no response in browser, doing wrong? .key , .crt files not generated me, copied it, can problem?

at time of writing this, there known issues using node-http2 express, see here: https://github.com/molnarg/node-http2/issues/100


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -