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

echo-srv

v1.0.0

Published

Minimalistic HTTP echo server

Readme

echo-srv

Tiny, zero-dependencies HTTP echo server for Node.js 20+. Available as CLI tool or Docker container.

Run via npx (no installation)

npx echo-srv [options]

Installation

Via npm (global)

npm install -g echo-srv

From source

git clone <repository-url>
cd echo-srv
npm link

Usage

echo-srv [options]

Or with npx:

npx echo-srv [options]

Options

  • -port <number> - Server port (default: 3000)
  • -headers - Log all HTTP headers
  • -headers '<header1>,<header2>,...' - Log only specific headers (case-insensitive)
  • -body - Log request body
  • -cors - Enable CORS (Access-Control-Allow-* headers set to *)
  • -help, --help - Show help message

Examples

Basic server on port 3000:

npx echo-srv

Custom port with headers and body logging:

npx echo-srv -port 8080 -headers -body

Log only specific headers:

npx echo-srv -headers 'Content-Type,Authorization'

Enable CORS:

npx echo-srv -cors

Output Format

The server logs each request in a structured format:

>>> [ 2025-10-13T12:34:56.789Z ]
GET /api/test?foo=bar
Query: {
  "foo": "bar"
}

With -headers flag:

>>> [ 2025-10-13T12:34:56.789Z ]
GET /api/test
Query: none
Headers: {
  "content-type": "application/json",
  "authorization": "Bearer token"
}

With -body flag:

>>> [ 2025-10-13T12:34:56.789Z ]
POST /api/data
Query: none
Body: {"key":"value"}

Response

All requests receive HTTP 200 OK with no body.

Docker

Build and run with defaults (all logging enabled + CORS)

docker build -t echo-srv .
docker run -p 3000:3000 echo-srv

Build with custom parameters

docker build \
  --build-arg PORT=8080 \
  --build-arg LOG_HEADERS=true \
  --build-arg LOG_BODY=true \
  --build-arg ENABLE_CORS=true \
  -t echo-srv .

Run on different port

docker run -p 8080:3000 echo-srv

Available build arguments

  • PORT - Server port (default: 3000)
  • LOG_HEADERS - Log all headers (default: true)
  • LOG_BODY - Log request body (default: true)
  • ENABLE_CORS - Enable CORS (default: true)