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

@isaacadams/platapi

v1.3.5

Published

The easiest way to create an API to love.

Readme

platapi.png

platapi — smart, simple, scalable APIs

  • Next.js-like file-based routing
  • Endpoints are simple, testable, functions
  • Runs server or serverless with no additional config
  • Automatically generate OpenAPI spec documentation

Getting Started (easy)

npx create-platapi

cd my-platapi-project

npm run dev

CLI Reference

Commands

platapi dev

Start the development server with hot reloading.

platapi dev
platapi dev -c ./custom-api.config.js

Options:

  • -c, --config <string> - Location of your api.config.js file (default: ./api.config.js)

platapi build

Build your API for production deployment.

# Basic production build
platapi build

# Build with source maps for debugging
platapi build -s
platapi build --sourcemap

# Build without minification (faster, uses less memory)
platapi build --no-minify

# Build with custom config
platapi build -c ./custom-api.config.js

# Build with increased memory limit
platapi build --max-old-space-size 6144

# Combine options
platapi build -s --no-minify -c ./api.config.js

Options:

  • -c, --config <string> - Location of your api.config.js file (default: ./api.config.js)
  • -s, --sourcemap - Generate source maps for debugging (default: false)
  • --no-minify - Skip minification to reduce memory usage and build time
  • --max-old-space-size <mb> - Set the Node.js heap limit for this command

Output:

  • build/server.js - Bundled server file
  • build/server.js.map - Source map file (when using -s)

platapi generate:docs

Generate OpenAPI 3.1 specification documentation for your API.

# Generate docs to console
platapi generate:docs

# Generate docs to file
platapi generate:docs -o ./openapi.json

# Merge with existing OpenAPI spec
platapi generate:docs -d ./base-spec.json -o ./openapi.json

# With custom config
platapi generate:docs -c ./custom-api.config.js -o ./docs.json

Options:

  • -c, --config <string> - Location of your api.config.js file (default: ./api.config.js)
  • -d, --defaultSpecFile <string> - Default OpenAPI 3.1 spec to merge with generated documentation
  • -o, --outfile <string> - Output docs to a file, otherwise prints to console
  • --max-old-space-size <mb> - Set the Node.js heap limit for this command

Environment Variables

PlatAPI supports several environment variables for advanced configuration:

# Set default heap limit for PlatAPI commands
PLATAPI_MAX_OLD_SPACE_SIZE=6144 platapi build

# Pass additional Node.js flags
PLATAPI_NODE_OPTIONS="--trace-gc" platapi build

# Enable memory usage debugging
PLATAPI_DEBUG_MEMORY=1 platapi generate:docs

Available Variables:

  • PLATAPI_MAX_OLD_SPACE_SIZE=<mb> - Sets the default heap limit for PlatAPI commands
  • PLATAPI_NODE_OPTIONS="..." - Passes extra Node flags to the respawned process
  • PLATAPI_DEBUG_MEMORY=1 - Logs phase-level RSS/heap usage during build and docs generation

Getting Help

# Show all commands
platapi
platapi help

# Show help for specific command
platapi build --help
platapi dev --help
platapi generate:docs --help

More docs coming soon