Skip to content

Instantly share code, notes, and snippets.

@bvanderlugt
Created August 15, 2017 21:42
Show Gist options
  • Save bvanderlugt/8ac344926ffd8386b79261c341d6594b to your computer and use it in GitHub Desktop.
Save bvanderlugt/8ac344926ffd8386b79261c341d6594b to your computer and use it in GitHub Desktop.
const https = require('https');
const fs = require('fs');
const options = {
key: fs.readFileSync('privkey.pem'),
cert: fs.readFileSync('cert.pem'),
ca: fs.readFileSync('fullchain.pem'),
requestCert: true,
}
https.createServer(options, (req, res) => {
res.writeHead(200);
res.end('crusader online');
}).listen(8080);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment