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

local-debug-proxy

v1.0.1

Published

`local-debug-proxy` is a lightweight Express middleware that lets you **forward incoming API requests to another backend (local or remote) at runtime**, without changing your application code or redeploying.

Readme

🚀 local-debug-proxy

local-debug-proxy is a lightweight Express middleware that lets you forward incoming API requests to another backend (local or remote) at runtime, without changing your application code or redeploying.

It’s designed for debugging, development, and temporary routing, not as permanent infrastructure.


✨ What It Does (In One Line)

Receive a request in one environment → execute it in another → return the response transparently.


🔥 Use Cases for local-debug-proxy


1️⃣ Debug Production Issues Using Local Code

Problem

Some bugs only appear in the server environment. Logs aren’t enough, and redeploying just to debug is slow and risky.

How local-debug-proxy Helps

  • Server receives the request
  • Request is forwarded to your local backend
  • Code executes locally with full debugger access
  • Response flows back to the original caller

Why This Is Powerful

  • Debug live behavior without redeploying
  • Use breakpoints, logs, and hot reload
  • Instantly disable when done

This is the #1 real-world reason teams use it.


2️⃣ Run Local Backend Logic Behind a Server URL

Problem

Frontend teams depend on a stable server URL, but backend logic is still changing locally.

How local-debug-proxy Helps

  • Frontend continues calling the server URL
  • Server forwards requests to your local backend
  • Local code responds as if it were deployed

Why This Is Powerful

  • No backend deployments needed
  • Frontend stays unblocked
  • Faster API iteration and testing

Perfect for feature development and integration testing.


3️⃣ Temporarily Forward Server Traffic for Deep Inspection

Problem

You need to inspect real request behavior end-to-end, but only for a short time and without changing infrastructure.

How local-debug-proxy Helps

  • Enable proxy at runtime
  • Forward selected routes to a local instance
  • Observe exact request/response flow
  • Disable immediately after investigation

Why This Is Powerful

  • Zero downtime
  • Fully reversible
  • Safe, controlled debugging sessions

Ideal for incident response and edge-case investigation.


📦 Installation

npm install local-debug-proxy

⚙️ Basic Usage (Express)

import express from "express";
import { createLocalDebugProxy } from "local-debug-proxy";

const app = express();

app.use(
  createLocalDebugProxy({
    enabled: process.env.NODE_ENV !== "production",
    mountPath: "/proxy",
    bypass: ["/proxy", "/health"],
    log: true,
  })
);

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
});

🌐 Proxy UI

Once enabled, open:

http://localhost:3000/proxy

From here you can:

  • Enable request forwarding
  • Set the target backend URL
  • Disable forwarding instantly

No restart required.


🛡️ Safety Notes

  • Disabled by default
  • Acts as a no-op middleware when turned off
  • Intended for debugging & development use
  • Not recommended for permanent traffic routing

🧠 Mental Model

local-debug-proxy lets you decide where code runs without changing where requests come from.


👤 Author & Maintainer

Ankit Kumar

Built and maintained with ❤️ for backend developers who want faster, safer debugging workflows.