Skip to content

Instantly share code, notes, and snippets.

@csandeep
Created August 20, 2015 14:44
Show Gist options
  • Save csandeep/78672d8521bc1c073755 to your computer and use it in GitHub Desktop.
Save csandeep/78672d8521bc1c073755 to your computer and use it in GitHub Desktop.
var Fs = require('fs');
var Hapi = require('hapi');
var Http2 = require('http2');
var options = {
key: Fs.readFileSync('./ssl/site.key');
cert: Fs.readFileSync('./ssl/site.crt');
};
var server = new Hapi.Server();
server.connection({
listener: Http2.createServer(options),
host: 'localhost',
port: 8080,
tls: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment