Skip to content

Instantly share code, notes, and snippets.

@danreedy
Created April 8, 2011 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danreedy/910182 to your computer and use it in GitHub Desktop.
Save danreedy/910182 to your computer and use it in GitHub Desktop.
A HTTPS Server using a locally created and self-signed wildcard SSL certificate (proof of concept)
var https = require('https');
var fs = require('fs');
var options = {
key: fs.readFileSync('local.key'),
cert: fs.readFileSync('local.pem')
};
https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
}).listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment