Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tiny-lr

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tiny-lr

Tiny LiveReload server, background-friendly

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is tiny-lr?

The tiny-lr package is a lightweight LiveReload server for use during development. It allows developers to automatically refresh the browser when files are changed, improving the development workflow by providing immediate feedback.

What are tiny-lr's main functionalities?

Start a LiveReload server

This feature allows you to start a LiveReload server on a specified port (35729 in this case). The server listens for changes and notifies the browser to reload.

const tinylr = require('tiny-lr');
const server = tinylr();
server.listen(35729, function() {
  console.log('... Listening on %s ...', 35729);
});

Trigger a reload

This feature allows you to manually trigger a reload by notifying the server of file changes. In this example, the server is notified that 'index.html' has changed, prompting a reload in the browser.

const tinylr = require('tiny-lr');
const server = tinylr();
server.listen(35729, function() {
  console.log('... Listening on %s ...', 35729);
});

// Simulate a file change
server.changed({ body: { files: ['index.html'] } });

Other packages similar to tiny-lr

FAQs

Package last updated on 20 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc