How to create an https server in Node.js
var https = require('https');
var fs = require('fs');
var options = {
key : fs.readFileSync('mykey.pem'),
cert: fs.readFileSync('my-cert.pem')
}
https.createServer(options, function (req, res) {
res.writeHead(200);
res.end("hello world\n");
}).listen(8000);
Watch video nodejs create https server extending tls server online without registration, duration hours minute second in high quality. This video was added by user Zariga Tongy 02 September 2014, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,955 once and liked it 5 people.