fix(livereload): process env vars as strings not boolean

This commit is contained in:
Asif Bacchus 2021-07-23 23:04:44 -06:00
parent 7ce5738399
commit e83dce3304

View File

@ -11,14 +11,18 @@ const options = {
exclusions: process.env.LR_EXCLUDE, exclusions: process.env.LR_EXCLUDE,
usePolling: true, usePolling: true,
delay: process.env.LR_DELAY, delay: process.env.LR_DELAY,
debug: process.env.LR_DEBUG
}; };
if (process.env.LR_HTTPS) { // set debugging output as per LR_DEBUG
if (process.env.LR_DEBUG === "true") {
options.debug = true
}
// set HTTPS as per LR_HTTPS
if (process.env.LR_HTTPS === "true") {
options.https = { options.https = {
cert: fs.readFileSync('/certs/fullchain.pem'), cert: fs.readFileSync('/certs/fullchain.pem'),
key: fs.readFileSync('/certs/privkey.pem') key: fs.readFileSync('/certs/privkey.pem')
}; };
} }