Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nodejs https server

var https = require('https');
var fs = require('fs');
var options = {
     key: fs.readFileSync('/path/to/privkey.pem'),
     cert: fs.readFileSync('/path/to/fullchain.pem'),
     ca: fs.readFileSync('/path/to/chain.pem')
}
var server = https.createServer(options, handlerFunction);
server.listen(8080, '127.0.0.1');
Source by community.letsencrypt.org #
 
PREVIOUS NEXT
Tagged: #nodejs #https #server
ADD COMMENT
Topic
Name
3+5 =