Created
April 11, 2018 21:29
-
-
Save mcollina/4a00a3a0c926b1b8a0e0ec460156b0e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 http2 = require('http2'); | |
const options = { | |
key: getKeySomehow(), | |
cert: getCertSomehow() | |
}; | |
// https is necessary otherwise browsers will not | |
// be able to connect | |
const server = http2.createSecureServer(options, (req, res) => { | |
res.end('Hello World!'); | |
}); | |
server.listen(3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment