inject live reload into HTML content
npm install inject-lr-script
Inject the LiveReload script snippet into a HTML response.
This detects .htm and .html and ensures they have text/html accept headers, if not yet set.
Example:
``js
var liveReload = require('inject-lr-script')
var stacked = require('stacked')
var http = require('http')
var serveStatic = require('serve-static')
var app = stacked()
app.use(liveReload())
app.use(serveStatic('app/'))
var server = http.createServer(app)
`
Note: This expects a
tag to be present in the HTML.Usage

####
middleware = liveReload([opt])Returns a function
middleware(req, res, next) which injects a LiveReload