{"library":"mini-lr","title":"Mini LiveReload Server","description":"mini-lr is a JavaScript package that provides a lightweight LiveReload server implementation. It was originally forked from the `tiny-lr` project to address perceived inactivity and provide support for `npm v3` during a period when `tiny-lr` was not being actively maintained. The package exposes an HTTP server and can be used as Express/Connect middleware, offering a basic REST API to notify the server of file changes, which are then broadcast to connected LiveReload clients. It does not include file watching capabilities itself, requiring external build processes or application logic to trigger change notifications. The current stable version is 0.1.9, though the project is explicitly deprecated, with its author recommending users switch back to the now-active `tiny-lr` package. Therefore, there is no active release cadence planned for `mini-lr`.","language":"javascript","status":"deprecated","last_verified":"Tue Apr 21","install":{"commands":["npm install mini-lr"],"cli":null},"imports":["const minilr = require('mini-lr');","const { Server } = require('mini-lr');","const minilr = require('mini-lr');\nconst lrMiddleware = minilr.middleware;"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const path = require('path');\nconst express = require('express');\nconst minilr = require('mini-lr');\nconst body = require('body-parser');\n\nconst port = process.env.LR_PORT || process.env.PORT || 35729;\n\nconst app = express();\n\napp\n  .use(body.urlencoded({ extended: true }))\n  .use(body.json())\n  .use(minilr.middleware({ app: app }))\n  .use(express.static(path.resolve('./')))\n  .listen(port, function() {\n    console.log(`LiveReload server listening on port ${port}`);\n    console.log('To trigger a reload, run: curl http://localhost:35729/changed?files=index.html');\n  });","lang":"javascript","description":"Demonstrates setting up a mini-lr server as Express middleware, serving static files and listening for LiveReload notifications.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}