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

deserved

v0.9.0

Published

A tiny Bun static file server: SPA, live reload, zero dependencies.

Readme

deserved

A tiny Bun static file server: SPA, live reload, zero dependencies.

deserved serves a folder over HTTP with one command and no config: clean URLs, an SPA fallback, ETags, ranges, and zstd or gzip. With --watch, editing a page reloads it in the browser, and editing a stylesheet swaps it in place. When port 3000 is taken, it takes the next free one and says so.

That's a two-file page under --watch, loaded in a browser, edited twice, then stopped with Ctrl-C. Each request is one line: its status, then its path.

It runs on Bun ≥ 1.4.

Quick start

bun add -d deserved

For a one-off run with no install, bunx deserved <dir> fetches it.

bunx deserved dist --spa    # serve dist/ at http://localhost:3000

Exit status: 130 when Ctrl-C stops it, 143 for SIGTERM, 1 when the folder or the port fails, 2 when called wrong. A mistyped option names the real one: Unknown option: --hlep (did you mean --help?).

Common tasks

# Serve the current folder
deserved .

# A single-page app: a route with no file gets index.html
deserved dist --spa

# Reload the browser on every save, and open it
deserved site --watch --open

# Another port; one you name fails when taken, and never hops
deserved dist --port 8080

# Reachable from a phone on the same network
deserved dist --host 0.0.0.0

# A production build: hashed files cached for good, the rest revalidated
deserved dist --cache

# Fetched from a page on another origin
deserved dist --cors

# No request log
deserved dist --quiet

The log is plain text when piped, under NO_COLOR, or when a coding agent runs it; there's no --json, since a server prints no data. These docs ship in the package, at node_modules/deserved/docs/.

From code

import { serve } from "deserved";

const server = await serve({ root: "dist", port: 0, quiet: true });
console.log(server.url); // http://localhost:<a free port>
await server.stop();

Docs

  • CLI: every option, how the port is picked, the log, and the exit codes
  • API: serve(), createHandler() inside your own Bun.serve(), the options and the errors
  • How it works: how a URL finds a file, the SPA fallback, caching, compression, live reload, and what it never serves