Skip to content

Instantly share code, notes, and snippets.

@heapwolf heapwolf/48.js
Created Aug 7, 2012

Embed
What would you like to do?
tls/server
var tls = require('tls'),
fs = require('fs');
var options = {
key: fs.readFileSync('private-key.pem'),
cert: fs.readFileSync('public-cert.pem')
};
tls.createServer(options, function (s) {
s.write("Hello, World\n");
s.pipe(s);
}).listen(8000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.