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

cors-dev-proxy

v0.0.0

Published

A minimal CLI helper to run a local development server with CORS enabled

Readme

cors-dev-proxy

A minimal CLI helper to run a local development server with CORS enabled. Perfect for frontend development when you need to proxy requests to a backend server that doesn't have CORS configured.

Installation

npm install -g cors-dev-proxy
# or
pnpm add -g cors-dev-proxy
# or
yarn global add cors-dev-proxy

Usage

cors-dev-proxy [options] <command> [args...]

Options

  • -i, --in <port> - Specify the port of the backend server to proxy to
  • -o, --out <port> - Specify the port for the CORS proxy (default: 3000)

Examples

Start a server and automatically detect its port:

cors-dev-proxy npm run dev

Specify ports explicitly:

cors-dev-proxy -i 5173 -o 3000 npm run dev

Run with Vite:

cors-dev-proxy vite

Run with any command:

cors-dev-proxy -o 8080 node server.js

How it works

  1. Spawns your command - Runs the specified command (e.g., your dev server)
  2. Detects the port - Automatically detects which port your server is listening on
  3. Creates a CORS proxy - Starts a proxy server that forwards requests with proper CORS headers
  4. Forwards requests - All requests to the proxy are forwarded to your backend with CORS enabled

Features

  • Automatic port detection - No need to specify ports if your server outputs them
  • 🔄 WebSocket support - Proxies WebSocket connections too
  • 🎯 Credentials support - Handles cookies and authorization headers
  • 🚀 Zero configuration - Just wrap your existing dev command
  • 📦 Minimal dependencies - Lightweight and fast

CORS Headers

The proxy automatically adds:

  • Access-Control-Allow-Origin - Set to the request origin or *
  • Access-Control-Allow-Methods - Supports GET, POST, PUT, DELETE, OPTIONS
  • Access-Control-Allow-Headers - Allows all requested headers
  • Access-Control-Allow-Credentials - Enabled when cookies/auth are present

License

MIT © Viktor Lázár