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

dirjet

v0.1.3

Published

Serve directories and individual files with a Rust static file server

Readme

dirjet

A Rust static file server for directories and individual files.

Run it with npx or bunx. No configuration file or Rust toolchain required.

Documentation · Contributing

Why use dirjet?

  • Runs a native binary, downloaded and cached for your OS and CPU.
  • Serves index.html files, directory listings, or a single file with its relative assets.
  • Supports file streaming, MIME types, HEAD requests, byte ranges, and conditional caching.
  • Blocks dotfiles, parent directory traversal, and symlinks that resolve outside the document root.

Quick start

Requires Node.js 18+ or Bun.

# Serve a specific directory
npx dirjet ./my-website

# Serve a single HTML file
npx dirjet index.html

# Serve the current directory
npx dirjet

The server listens at http://127.0.0.1:3000 by default. Stop it with Ctrl+C.

With Bun, use bunx dirjet ./my-website. If Node.js is not installed, use bunx --bun dirjet ./my-website to run the launcher with Bun.


How it serves files

Directories

Directories serve index.html when present, otherwise they show a directory listing. Directory URLs redirect to a trailing slash so relative assets resolve correctly.

Single files

Passing a file, such as npx dirjet presentation.html, serves it at / and /presentation.html. Its parent directory becomes the document root so relative stylesheets, scripts, and images work, including assets in subdirectories.

Other non-hidden files in that parent directory are also accessible by URL. Directory listings are disabled in single-file mode.

dirjet serves static files. Build TypeScript, JSX, and other frontend source assets before serving them. It does not transpile code, provide live reload, or terminate TLS.


Options

dirjet [OPTIONS] [PATH]

| Option | Default | What it does | | :--- | :--- | :--- | | -p, --port <PORT> | 3000 | Change the server port. Use 0 to automatically pick an available port. | | -l, --listen <PORT> | 3000 | Alias for --port. | | --host <IP> | 127.0.0.1 | Bind to a specific IP address. Use 0.0.0.0 to make the server accessible to other devices on your local network. | | -s, --single | Off | Single-page app mode. Serve the entry file for missing extensionless routes. | | --no-listing | Off | Returns a 404 Not Found for directories that don't have an index.html file, instead of showing a directory list. | | -h, --help | | Show the help menu. | | -V, --version | | Show the current version. |

Serve a single-page app

npx dirjet -s ./dist -p 8080

Missing routes such as /users/42 return index.html so your frontend router can handle them. Missing assets such as /missing.js still return 404. When serving a single file, --single uses that file as the fallback.


Binary downloads and caching

On first run, the JavaScript launcher downloads the native binary for your OS and CPU from the matching GitHub release. It verifies the binary's SHA-256 checksum before running it and saves it in your OS cache directory. The first run needs access to GitHub Releases.

Later runs verify and reuse the cached binary. Each version has a separate cache entry. Interrupted or invalid downloads are discarded. No postinstall scripts run.

Prebuilt binaries support Linux, macOS, and Windows on x64 and ARM64.

Set DIRJET_CACHE_DIR to use a custom, writable cache directory.