Open ghost opened 6 years ago
Add this to server.js
var options = { key: fs.readFileSync('../../certs/server.key'), cert: fs.readFileSync('../../certs/server.crt'), requestCert: false, rejectUnauthorized: false };
Change var server = require('http')
by require ('https')
And finally, add options like this : var app = server.createServer(options, serverHandler);
That's all :)
I tried to make node js as https by adding certificates in record to node js but it is not working can you provide a solution for this