Created
April 3, 2017 18:30
-
-
Save ofanidariyan/c446cc67ec60be50ec511e1299f1b6fa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let https = require('https'); | |
let fs = require('fs'); | |
let options = { | |
key: fs.readFileSync('/opt/certs/example.com.key'), | |
cert: fs.readFileSync('/opt/certs/example.com.crt') | |
}; | |
https.createServer(options, function (req, res) { | |
res.writeHead(200); | |
res.end("Welcome to Node.js HTTPS Server!!!"); | |
}).listen(3443); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment