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

byte-cafe

v0.0.1

Published

A lovely cafe that serves you bytes.

Readme

Byte Café ☕

A lovely café that serves you bytes.

Byte Café is a simple, lightweight, and configurable static file server for Node.js. It's perfect for serving single-page applications, static websites, or for local development.

Features

  • Static file serving: Serve static files from a specified directory.
  • Glob patterns: Include or exclude files using glob patterns.
  • Customizable base path: Serve files from a custom base path.
  • Port fallback: Automatically try the next available port from a predefined list if the specified port is in use.
  • File streaming: Efficiently stream large files.
  • Directory listing: Serve an index.html file when a directory is requested.

Planned Features

  • Range requests: Support for Range headers for partial content delivery.
  • Authentication: Basic authentication to protect your files.
  • Custom response headers: Add custom headers to your responses.
  • Aliases: Create aliases for your files and directories.

Installation

npm install byte-cafe

Usage

Command-Line Interface (CLI)

Byte Café comes with a simple CLI for quick and easy serving.

npx byte-cafe [path] [port]
  • path (optional): The base path to serve files from. Defaults to the current working directory.
  • port (optional): The port to listen on. Defaults to 3333.

Example:

Serve files from the public directory on port 8080:

npx byte-cafe public 8080

Programmatic Usage

Byte Café can also be used programmatically for more advanced configurations.

import { Cafe } from "byte-cafe";

const cafe = new Cafe({
  basePath: "public",
  port: 8080,
  menu: {
    include: ["**/*.html", "**/*.css", "**/*.js"],
    exclude: ["**/*.map"],
  },
});

cafe.listen().then((cafe) => {
  console.log(`Café is open for business at http://localhost:${cafe.port}`);
});

Configuration

The Cafe constructor accepts a configuration object with the following properties:

  • basePath (optional, string): The base path to serve files from. Defaults to the current working directory.
  • port (optional, number): The port to listen on. Defaults to 8080.
  • menu (optional, object): An object with include and exclude properties, which are arrays of glob patterns.
    • include (optional, string[]): An array of glob patterns to include. Defaults to ["**/*"].
    • exclude (optional, string[]): An array of glob patterns to exclude. Defaults to [].
  • serveDirectories (optional, boolean): Whether to serve directory listing when a directory is requested. Defaults to false.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on our GitHub repository.

License

Byte Café is licensed under the MIT License.