[From] https://segmentfault.com/q/1010000004705326
var options = { ???key: fs.readFileSync(‘../ssl/private.key‘,‘utf8‘), ???cert: fs.readFileSync(‘../ssl/certificate.crt‘,‘utf8‘), ???ca: fs.readFileSync(‘../ssl/ca_bundle.crt‘,‘utf8‘)};http.createServer(app).listen(3000);https.createServer(options, app).listen(3001);
NodeJS使用SSL证书
原文地址:http://www.cnblogs.com/pekkle/p/7872002.html