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

flash-framework

v0.1.0

Published

High-performance C++/TypeScript HTTP server framework

Downloads

24

Readme

Flash Framework

High-performance C++/TypeScript HTTP server framework

Node.js Version C++ Standard License: MIT

⚡ Performance

| Metric | Flash | Express.js | Improvement | |--------|-------|------------|-------------| | Requests/sec | 173,244 | 25,088 | 6.9x faster | | P50 Latency | 80μs | 3.7ms | 46x lower |

Flash Framework combines the performance of C++ with the developer experience of TypeScript. It uses N-API to bridge the two languages, providing a high-performance HTTP server with a clean, modern API.

🚀 Quick Start

Using Docker (Recommended for Development)

# Clone the repository
git clone <repository-url>
cd flash-framework

# Run the development setup script
./dev-setup.sh

# Start development environment
npm run docker:dev

The development environment includes:

  • ✅ Hot reloading for TypeScript changes
  • ✅ Volume mounting for live code editing
  • ✅ Debug port (9229) for Node.js debugging
  • ✅ Redis for caching (optional)
  • ✅ All development dependencies pre-installed

Access Points:

  • Server: http://localhost:3000
  • Debug: localhost:9229
  • Redis: localhost:6379 (if enabled)

Manual Setup

Prerequisites

  • Node.js 20+ with npm
  • CMake 3.20+
  • C++20 compatible compiler (Clang 12+ or GCC 10+)
  • Python 3.x (for node-gyp)

macOS Setup

# Install dependencies
brew install node cmake llvm python3

# Clone and setup
git clone <repository-url>
cd flash-framework
npm install

# Build the project
npm run build

# Run example
npm run dev

Linux Setup

# Install dependencies (Ubuntu/Debian)
sudo apt update
sudo apt install -y build-essential cmake clang nodejs npm python3

# Clone and setup
git clone <repository-url>
cd flash-framework
npm install

# Build the project
npm run build

# Run example
npm run dev

📖 Usage

import { Flash } from "flash-framework";

const app = new Flash({ workers: 4 });

app.get("/api/users/:id", async (req, res) => {
  const user = await getUserById(req.params.id);
  res.json(user);
});

app.listen(5627, () => {
  console.log("Flash server running on port 5627");
});

🏗️ Architecture

┌─────────────────────────────────────────┐
│     User Application (TypeScript)       │
│  ┌────────────────────────────────────┐ │
│  │   app.get('/route', handler)       │ │
│  └────────────────┬───────────────────┘ │
└───────────────────┼─────────────────────┘
                    │
┌───────────────────┼─────────────────────┐
│  Flash Framework  │  (TypeScript Layer) │
│  ┌────────────────▼───────────────────┐ │
│  │  Router │ Middleware │ Types       │ │
│  └────────────────┬───────────────────┘ │
└───────────────────┼─────────────────────┘
                    │ N-API
┌───────────────────┼─────────────────────┐
│   N-API Bridge    │                     │
│  ┌────────────────▼───────────────────┐ │
│  │  Type Conv │ Async Queue │ Errors  │ │
│  └────────────────┬───────────────────┘ │
└───────────────────┼─────────────────────┘
                    │
┌───────────────────┼─────────────────────┐
│   C++ Core        │                     │
│  ┌────────────────▼───────────────────┐ │
│  │     HTTP Server (kqueue/epoll)     │ │
│  ├────────────────────────────────────┤ │
│  │     Worker Thread Pool             │ │
│  ├────────────────────────────────────┤ │
│  │     Request/Response Objects       │ │
│  ├────────────────────────────────────┤ │
│  │     Connection Manager             │ │
│  └────────────────────────────────────┘ │
└─────────────────────────────────────────┘

🧪 Testing

# Run all tests
npm run test:all

# Run TypeScript tests only
npm test

# Run C++ tests only
npm run test:cpp

# Run with coverage
npm run test:coverage

📊 Benchmarking

# Run benchmarks
npm run benchmark

# Or using Docker
docker-compose up benchmark

🐳 Docker Commands

# Build Docker image
docker build -t flash-framework .

# Run container
```bash
docker run -p 5627:5627 flash-framework

# Development with hot reload
docker-compose up dev

# Production deployment
docker-compose up -d app

📁 Project Structure

flash-framework/
├── cpp/                    # C++ source code
│   ├── include/           # Public headers
│   ├── src/              # Implementation files
│   ├── binding/          # N-API bridge code
│   └── tests/            # C++ unit tests
├── src/                   # TypeScript source
│   ├── index.ts          # Main exports
│   ├── router.ts         # Routing logic
│   ├── middleware/       # Middleware components
│   └── types/            # TypeScript definitions
├── tests/                # Test suites
│   ├── unit/            # Unit tests
│   └── integration/     # Integration tests
├── examples/             # Example applications
├── benchmarks/           # Performance tests
├── docs/                 # Documentation
├── Dockerfile           # Docker configuration
├── docker-compose.yml   # Docker Compose setup
├── CMakeLists.txt       # C++ build configuration
├── binding.gyp          # Node-gyp configuration
├── package.json         # Node.js dependencies
├── tsconfig.json        # TypeScript configuration
└── README.md

🤝 Contributing

This is a learning project! Contributions are welcome, especially:

  • Bug fixes
  • Performance improvements
  • Documentation improvements
  • Example applications

📄 License

MIT License - see LICENSE file for details.

🔗 Links

Flash