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

http-418

v0.1.0

Published

I'm a Teapot πŸ«– β€” Mock any HTTP status code instantly

Downloads

84

Readme

What?

Need a server that returns 404? 500? 418 I'm a Teapot?

npx 418 404

That's it. A server is now running on localhost:4180, returning 404 Not Found to every request. Every method, every path, every time.

Why?

Because when you're testing error handling in your frontend, API client, or webhook β€” you don't want to write a whole server. You want to type one command and get back to work.

Install

# Just use it (no install needed)
npx 418

# Or install globally
npm install -g 418

Usage

# Default: the legendary 418 I'm a Teapot
npx 418

# Any status code
npx 418 404
npx 418 500
npx 418 204

# Custom port
npx 418 503 -p 3000

# List all HTTP status codes
npx 418 -l

# List only 4xx codes
npx 418 -l 4xx

What you'll see

        ;,'
     _,-'/  )
  .-'  '  .-'  πŸ«– 418 is brewing...
 /  ._   (
(   ' -._  )
 \  '.  > /
  '._'>-'

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  Status:  404 Not Found             β”‚
  β”‚  Server:  http://localhost:4180     β”‚
  β”‚  Press Ctrl+C to stop              β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

  [14:30:01] GET     /api/users                     β†’ 404 Not Found
  [14:30:03] POST    /login                         β†’ 404 Not Found

Response format

Every request gets a JSON response:

{
  "status": 404,
  "message": "Not Found",
  "rfc": "RFC 7231"
}

Plus these headers:

  • X-Powered-By: 418
  • X-Status-Name: Not Found
  • Access-Control-Allow-Origin: * (CORS-friendly)

List all status codes

npx 418 -l
  1xx Informational
  πŸ‘‰  100 Continue                            Keep going, you're doing great
  πŸ”„  101 Switching Protocols                 Upgrading to something better

  2xx Success
  βœ…  200 OK                                  Everything is awesome
  πŸ‘Ά  201 Created                             Something new was born

  4xx Client Error
  πŸ‘»  404 Not Found                           It's not here. Never was. Maybe
  πŸ«–  418 I'm a Teapot                        Short and stout. Tip me over!
  ...

Zero Dependencies

Built with nothing but Node.js built-in http module. No chalk, no express, no commander. Just tea.

Status Codes

All standard HTTP status codes (1xx–5xx) are supported, including the greats:

| Code | Name | The Vibe | |------|------|----------| | 200 | OK | Everything is awesome | | 301 | Moved Permanently | We've moved. Update your bookmarks | | 404 | Not Found | It's not here. Never was. Maybe | | 418 | I'm a Teapot | Short and stout. Tip me over! | | 429 | Too Many Requests | Slow down! Rate limited | | 451 | Unavailable For Legal Reasons | Censored. Fahrenheit 451 style | | 500 | Internal Server Error | Something broke on our end | | 503 | Service Unavailable | We're down, try again later |

FAQ

Why "418"? Because RFC 2324 defined the Hyper Text Coffee Pot Control Protocol, which includes the legendary 418 I'm a Teapot status code. It's the internet's best easter egg, and now it's the internet's simplest mock server.

Can I use any status code? Yes! Any code from 100 to 599. If it's a standard code, we'll show you its name and RFC. If it's non-standard, it still works.

Is this production-ready? This is a development tool. Please don't serve your production traffic through a teapot.

License

MIT Β© Zhang Xilin