You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform: Linux linuxbox 4.10.0-30-generic fix LICENSE #34~16.04.1-Ubuntu SMP Wed Aug 2 02:13:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
**Subsystem: http2
// Server
const http2 = require('http2');
const hostname = '127.0.0.1';
const port = 3000;
// Create a plain-text HTTP/2 server
const server = http2.createSecureServer();
server.on('stream', (stream, headers) => {
// stream is a Duplex
stream.respond({
'content-type': 'text/html',
':status': 200
});
stream.end('<h1>Hello World</h1>');
});
server.listen(port, hostname, () => {
console.log(`Server running at https://${hostname}:${port}/`);
});
./node --expose-http2 http2server.js (node:21866) ExperimentalWarning: The http2 module is an experimental API. Server running at https://127.0.0.1:3000/
https://127.0.0.1:3000/ is unreachable and no warnings in terminal