micro
Tiny, async/await-first library for building HTTP microservices in Node.js
Repository Health
Technical Analysis
micro is a minimal Node.js library from Vercel for writing single-purpose HTTP services as plain async functions. A microservice is just a module that exports (req, res) => {} (or returns a value directly), and micro handles response serialization, error status codes, and body-parsing helpers like json, text, and buffer around the standard Node http request/response objects.
The project intentionally stays under a megabyte with all dependencies and has no built-in middleware system by design — services are expected to compose plain functions rather than depend on a plugin ecosystem. It ships both as a programmatic API (serve, send, createError) and a micro CLI for running a service in production.
What You Get
- A
serve(fn)wrapper that turns an async(req, res) => valuefunction into a standard Node HTTP handler - Body-parsing helpers
buffer,text, andjsonwith configurable size limits - A
send(res, statusCode, data)helper that serializes objects, buffers, and streams with correct headers - Structured error handling via
createErrorand automaticstatusCode-aware error responses - A
microCLI for running a service against TCP, UNIX socket, or Windows named pipe endpoints
Common Use Cases
- Writing a small, single-purpose HTTP endpoint deployed in its own container
- Building lightweight internal APIs without pulling in a full web framework’s routing and middleware stack
- Parsing JSON or urlencoded request bodies in a Node service with explicit size limits
- Prototyping an HTTP service quickly with plain async functions instead of framework boilerplate
Under The Hood
Architecture - The published micro package lives in a small pnpm/lerna monorepo (packages/micro) with the library implementation under packages/micro/src/lib (the serve, send, buffer/text/json, and error-handling functions) and a separate CLI entry point under packages/micro/src/bin that resolves a service’s main file and starts an HTTP server listening on TCP, UNIX socket, or named-pipe endpoints. Tech Stack - Written in TypeScript, compiled with tsc to a dist folder with generated .d.ts types, and designed to have effectively no runtime dependencies of its own beyond Node’s built-in http module, keeping the installed package under a megabyte. Code Quality - The project ships a dedicated errors workspace package alongside micro and a test directory exercising body-parsing and error-handling behavior; the codebase has stayed small (~260 lines was the historical target) across 436 commits and 61 tagged releases, prioritizing stability over feature growth. API Design - The public API is deliberately tiny — one wrapper function (serve), three body helpers, and one response helper — with no middleware system, so services are just plain async functions; this keeps the learning curve minimal but pushes cross-cutting concerns like auth or logging onto explicit function composition rather than a plugin ecosystem.
Used by 8 apps in this directory
Abby
Developer Tools · Product Management
Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.
Automatisch
Automation · No Code Platforms
Self-hosted, no-code workflow automation that keeps your data on your own servers—a privacy-first alternative to Zapier with 90+ integrations.
Cal.diy
Scheduling
The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.
Helicone
Monitoring · AI Development · Analytics
An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.
Linkwarden
Bookmarks Archiving · Knowledge Management
Self-hosted collaborative bookmark manager that captures full-page archives, enables annotation, and keeps your knowledge accessible forever.
Rallly
Scheduling
Self-hostable group scheduling polls that eliminate back-and-forth emails and find the best meeting time for everyone.
Snapify
Collaboration · Productivity
Open-source, self-hostable screen recording and video sharing built as a Loom alternative — no accounts required to watch, full S3-backed storage for your data.
Typebot
Developer Tools · AI Development · No Code Platforms
Build sophisticated chatbots visually, embed them anywhere without iframes, and own your data — fully self-hostable with a modular block system and 30+ integrations.