
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@engblock/microfrontend-hono-gateway
Advanced tools
[](https://badge.fury.io/js/%40engblock%2Fhono-gateway-core) [](https://opensource.org/licenses/MIT)
Core library for building flexible, type-safe micro-frontend or micro-service gateways using Hono. This library provides the foundational components to route incoming requests based on URL prefixes to different handlers, supporting both direct function calls (monorepo style) and HTTP forwarding (e.g., Cloudflare Workers Service Bindings).
In modern web architectures, it's common to split applications into smaller, independently deployable units (micro-frontends or micro-services). A gateway acts as the single entry point, routing requests to the appropriate downstream service or rendering module.
hono-gateway-core simplifies the creation of such gateways within the Hono framework by providing:
createGateway): Sets up a Hono application with core routing logic.MicroAppHandler): Decouples the gateway from the specific mechanism used to handle the request (direct call vs. HTTP fetch).DirectCallHandler: For invoking local ssr functions directly (ideal for monorepos).HttpFetchHandler: For forwarding requests to other HTTP endpoints or Cloudflare Worker Service Bindings.createGateway. It intercepts requests matching patterns like /:appName/* and uses the configuration to find the correct handler.MicroAppHandler: An interface defining the contract for handling a request delegated by the gateway. The key method is handle(c: Context): Promise<Response>, which must return a complete Response object.DirectCallHandler: An implementation of MicroAppHandler that takes a module conforming to the DirectRenderApp interface (having an ssr(c: Context): Promise<string> | string method). It calls the ssr method and wraps the resulting HTML string in a Response.HttpFetchHandler: An implementation of MicroAppHandler that forwards the incoming request to another HTTP service. It can be configured to use Cloudflare Worker Service Bindings (type: 'cf_binding') or a standard base URL (type: 'url'). It returns the Response received from the downstream service.HandlerConfigFactory: A function (c: Context<GatewayEnv>) => HandlerConfig provided to createGateway. It's responsible for creating the mapping between URL prefixes (e.g., "profile") and their corresponding MicroAppHandler instances. Crucially, it receives the Hono Context (c), allowing access to environment variables (c.env) needed for configuring handlers (like HttpFetchHandler with service bindings).MicroAppHandler implementations for other delegation strategies.# Using npm
npm install @engblock/hono-gateway-core hono
# Using yarn
yarn add @engblock/hono-gateway-core hono
# Using pnpm
pnpm add @engblock/hono-gateway-core hono
FAQs
[](https://badge.fury.io/js/%40engblock%2Fhono-gateway-core) [](https://opensource.org/licenses/MIT)
We found that @engblock/microfrontend-hono-gateway demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.