feature(server invocation script):
This commit is contained in:
parent
cc10ee2241
commit
e82fad68ac
25
build/livereload.js
Normal file
25
build/livereload.js
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user