nodejs create https server extending tls server

Published: 02 September 2014
on channel: Zariga Tongy
1,955
5

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);


On this page of the site you can watch the video online nodejs create https server extending tls server with a duration of hours minute second in good quality, which was uploaded by the user Zariga Tongy 02 September 2014, share the link with friends and acquaintances, this video has already been watched 1,955 times on youtube and it was liked by 5 viewers. Enjoy your viewing!