I'm facing a problem with SSL integration with node.js when i integrating certificate and restart the server it shows error:0906d06c:pem routines:pem_read_bio:no start line Godaddy SSL certificate
I'm using this code:
const https = require('https');
const fs = require('fs');
var key=fs.readFileSync(__dirname+'/../ssl/sslforfree_private.key','utf8');
var cert= fs.readFileSync(__dirname + '/../ssl/sslforfree_certificate.crt','utf8');
var credentials = {key: key, cert: cert};
var port = normalizePort(process.env.PORT || '4000');
app.set('port', port);
var server = https.createServer(credentials,app);