-
-
Save kysnm/d971a3bafaf6f147f25d429f93590627 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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