Analysis updated 2026-05-18
Build a lightweight HTTP API endpoint that handles JSON requests inside a Docker container.
Create a single-purpose microservice that reads POST body data and returns a computed result.
Add a standalone HTTP service to an existing Node.js project without pulling in a full web framework.
Write integration tests for HTTP handlers by spinning up a real server in a test file and sending real requests.
| vercel/micro | maplibre/maplibre-gl-js | chathub-dev/chathub | |
|---|---|---|---|
| Stars | 10,613 | 10,611 | 10,609 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Micro is a small library from Vercel that makes it easy to build HTTP services in Node.js using the modern async/await style. It strips away most of the ceremony usually involved in setting up a server, letting you export a single function that receives a request and returns a response. The entire library is about 260 lines of code and stays deliberately lightweight, with JSON parsing opt-in rather than automatic, so performance stays high even under load. Getting started takes only a few steps. Install it with npm, write a file that exports a function, add a start script to your package.json, and run npm start. Your service listens on port 3000 by default. Micro includes helper functions for reading the incoming request body as raw bytes, plain text, or JSON, and for sending responses with specific HTTP status codes. Error handling works through standard JavaScript throwing. If your code throws an unhandled error, Micro automatically sends a 500 response back to the caller. If the error object has a statusCode property, Micro uses that number as the HTTP status code instead, so building rate-limiting or validation logic is a matter of throwing an error with the right code rather than writing custom response logic for each failure. The library is designed specifically for services running inside containers such as Docker, not for serverless platforms. The README notes explicitly that if you are deploying to Vercel's own hosting, Micro is not needed, because the platform already provides equivalents to its utility functions. For development, a separate companion package called micro-dev adds live reloading and other convenience features suited to that environment. Micro has no middleware system. If you need to share logic across handlers, the approach is to compose plain functions. A community collection called awesome-micro lists third-party modules that extend it. Testing is also straightforward: you start a real HTTP server in your test file, send a request, and inspect the response, all within a few lines of code.
Micro is a tiny Node.js library for building HTTP services with a single exported function, using async/await for clean, high-performance request handling inside containers.
Mainly TypeScript. The stack also includes TypeScript, Node.js.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.