A simple HTTPS server using node.js: const crypto = require('crypto'), fs = require("fs"), http = require("http"); var privateKey = fs.readFileSync('privatekey.pem').toString(); var certificate = fs.readFileSync('certificate.pem').toString(); var credentials = crypto.createCredentials({key: privateKey, cert: certificate}); var handler = function (req, res) { res.writeHead(200, {'Content-Type': 'te