bootbot
bootbot copied to clipboard
enable SSL in express server
i want to add key and CRT to express server but it is not working my edit is as following
start(port) {
this._initWebhook();
this.app.set('port', port || 3000);
var fs = require('fs');
var https = require('https');
var options = {
key: fs.readFileSync('crt/server-key.pem'),
cert: fs.readFileSync('crt/server-crt.pem'),
ca: fs.readFileSync('crt/ca-crt.pem')
};
var httpsServer = https.createServer(this.options, this.app);
httpsServer.listen(3000);
}
I found running it through a proxy such as Caddy was easier than getting express to do what I wanted