From e82fad68ac64f6401b266499a7d5ac8ffc634682 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Thu, 22 Jul 2021 16:43:17 -0600 Subject: [PATCH] feature(server invocation script): --- build/livereload.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build/livereload.js 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