Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
HTTPS Test Server
#!/usr/bin/env node
const fs = require("fs"),
https = require("https");
var opts = {
key: fs.readFileSync("myprivatekey.pem", 'utf8'),
cert: fs.readFileSync("mypublickey.pem", 'utf8'),
ca: [fs.readFileSync("ca-pub.pem", 'utf8')],
requestCert: true,
rejectUnauthorized: true
};
var handler = function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
};
var server = https.createServer(opts, handler);
server.listen(443);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.