bootbot
bootbot copied to clipboard
HTTPS server feature
HTTPS server feature
The pull request from the issue #182
You can now start a HTTPS server with credentials
const port = 3000;
const privateKey = fs.readFileSync(env_1.config.tls.key, 'utf8');
const certificate = fs.readFileSync(env_1.config.tls.cert, 'utf8');
const credentials = { key: privateKey, cert: certificate };
new BootBot(...).start(port, credentials);
@Charca What do you think about that ?
If you have different certificates files, you cans use the next:
const https_option = {
key: fs.readFileSync('path_key_file.key', 'utf8'),
cert: fs.readFileSync('path_cert_file.crt', 'utf8'),
ca: [
fs.readFileSync('path_DomainValidationSecureServerCA_cert_file.crt'),
fs.readFileSync('USERTrustpath_cert_file.crt')
]
}
bot.start(process.env.PORT, https_option)
That works for me 👍