serve-once
JSON →A utility for testing Express middleware by serving exactly one HTTP request then closing the server. It creates an HTTP server on a free port, runs the middleware, serves one request, and resolves with the response body. The current stable version is 3.0.2, released in early 2024. It supports GET, POST, PUT, DELETE, HEAD, and other methods. The package was rewritten in v3 to remove node-fetch dependency and requires Node >=18. It returns responses as string, JSON, buffer, or stream. It is lightweight and similar to supertest but simpler and focused on single-request testing.
Traffic · last 30 days ↓50% vs prev 7d
total hits 26
actors 8 distinct systems
last hit 1d ago AhrefsBot
top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇩🇪 Germany · ZA
API endpoints
full doc /v1/registry/serve-once
install /v1/registry/serve-once/install
compatibility /v1/registry/serve-once/compatibility