Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created August 7, 2012 06:00
Show Gist options
  • Save heapwolf/3282168 to your computer and use it in GitHub Desktop.
Save heapwolf/3282168 to your computer and use it in GitHub Desktop.
http/secure
var https = require('https');
var fs = require('fs');
var options = {
key: fs.readFileSync('key.pem'),
cert: fs.readFileSync('cert.pem')
};
var a = https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
}).listen(4000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment