npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

liverun

v0.5.6

Published

A simple tool for live reloading during development. This package should be installed as a devDependency.

Readme

liverun 🚀

LIVE CODE. RUN INSTANTLY.

npm version License: MIT CI

A zero-configuration hot reloading tool designed to supercharge your Express.js and Node.js development.

Get the blazing-fast, modern developer experience of frameworks like Next.js or Vite, without the added complexity. liverun seamlessly restarts your server when backend files change and instantly refreshes your browser when frontend assets are modified—keeping you perfectly in the flow.

Features ✨

  • Zero Configuration — No need to modify your Express app or add custom middleware.
  • Backend Hot Restart — Automatically restarts your Node process when server-side files (.js, .ts, .json) change.
  • Frontend Auto-Refresh — Instantly reloads the browser when client-side assets (HTML, CSS, client-side JS) change.
  • Seamless Injection — Uses a lightweight reverse proxy to dynamically inject the live-reload script into HTML responses.
  • Smart Port Detection — Reads your source code to detect the port your app uses. Handles port conflicts with an interactive prompt.
  • Port Interception — Intercepts net.Server.listen() via a preload hook, so even hardcoded ports (e.g., app.listen(4000)) work seamlessly.
  • Error Overlay — Displays a styled HTML error page in the browser when your server crashes, complete with the terminal error output. The page auto-reloads when the server recovers.
  • Graceful Shutdown — Properly cleans up child processes, file watchers, and proxies on SIGINT/SIGTERM. Force-kills hung processes after a timeout.
  • Debounced Restarts — File change events are debounced to avoid unnecessary rapid restarts.

Installation 📦

Install the package as a dev dependency in your project:

npm install --save-dev liverun

Usage 💻

Simply replace node with liverun when starting your server script:

npx liverun server.js

In your package.json

The best way to use it is to add it as your dev script in package.json:

{
  "scripts": {
    "start": "node server.js",
    "dev": "liverun server.js"
  }
}

Then run:

npm run dev

How it works ⚙️

When you run liverun, it wraps your application:

  1. It spins up a Proxy Server on port 3000 (or the port it detects from your source code).
  2. It spawns your actual Express app on an internal port, using a preload hook to intercept net.Server.listen().
  3. As traffic flows through the proxy, it watches for HTML responses and injects a tiny WebSocket client script right before the </body> tag.
  4. When chokidar detects frontend changes, it broadcasts a signal over WebSockets to refresh the browser. When backend files change, it safely restarts the child Node process.
  5. If the server crashes, the proxy catches the connection error and displays a styled error overlay in the browser with the terminal output. The page auto-reloads once the server recovers.

CLI Options 🛠️

You can customize the port and the directories that are being watched:

Usage: liverun [options] <script>

Arguments:
  script                            The express server script to run (e.g. server.js)

Options:
  -V, --version                     output the version number
  -p, --port <number>               Port for the live-dev proxy to listen on
  -s, --watch-server <directories>  Comma separated directories to watch for server restart
                                    (default: ".,src,routes,models,controllers")
  -c, --watch-client <directories>  Comma separated directories to watch for client refresh
                                    (default: "public,views")
  -h, --help                        display help for command

Example: Custom Watch Directories

If your backend is in api/ and frontend is in static/:

npx liverun -s api,config -c static,templates server.js

Contributing 🤝

See docs/setup.md for local development setup and docs/architecture.md for the project structure.

git clone https://github.com/NordinAlex/liverun.git
cd liverun
npm install
npm run dev      # Watch mode (rebuilds on changes)
npm test         # Run test suite

License 📄

MIT License. See LICENSE for details.