diff --git a/build/livereload.js b/build/livereload.js new file mode 100644 index 0000000..855e5bb --- /dev/null +++ b/build/livereload.js @@ -0,0 +1,25 @@ +// implement node-livereload over an HTTPS connection + +// load livereload module +let livereload = require('livereload'); + +// set createServer options +const https = require('https'); +const fs = require('fs'); +const options = { + https: { + cert: fs.readFileSync('/certs/fullchain.pem'), + key: fs.readFileSync('/certs/privkey.pem') + }, + port: process.env.LR_PORT, + exts: process.env.LR_EXTS, + exclusions: process.env.LR_EXCLUDE, + usePolling: true, + delay: process.env.LR_DELAY +}; + +// start server +let server = livereload.createServer(options); +server.watch('/var/watch') + +//#EOF