FAQ
Why is the HTTP package named @heronjs/express?
@heronjs/express retains its package name, but 4.0.0 uses Fastify 5. Requests, replies, plugins and hooks are native Fastify APIs. See HTTP configuration.
How do I change the port or URI prefix?
Pass port to app.listen(). Use options.uri for an HTTP route prefix. app.address() reports the bound address; the default port is 3000.
How do I apply global interceptors or handle errors?
Use options.interceptors for request/reply functions and options.globalError for (error, request, reply) handling. Use Fastify hooks or plugins for native lifecycle integration. Express middleware and next() are unsupported. See Interceptor.
Can I keep using CommonJS?
4.0.0 publishes ESM JavaScript and declarations only, requires Node.js 24 or later, and removes CommonJS worker entries. See the Migration Guide.
How do I stop an application?
Await app.close(). It stops owned protocols, services and workers, waits for cleanup, and attempts remaining disposers if one fails. Standalone resources remain the caller’s responsibility.
Are 3.7.11 docs and the playground still available?
3.7.11 documentation retains its existing URLs. The playground lets you switch between 4.0.0 and 3.7.11 examples. Edits are kept separately for each version while the page is open.