Create a gist now

Instantly share code, notes, and snippets.

@kysnm /index.js Secret
Created Dec 23, 2016

const fs = require('fs');
const http2 = require('http').HTTP2;
const options = {
key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
};
const server = http2.createSecureServer(options, (req, res) => {
res.writeHead(200, {'content-type': 'text/html'});
res.end('Hello world');
});
server.listen(8000, 'localhost', () => {
console.log('Ready!');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment