Skip to content

Instantly share code, notes, and snippets.


kysnm/index.js Secret

Created Dec 23, 2016
What would you like to do?
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', () => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment