Skip to main content

24 docs tagged with "HttpRouter"

View all tags

Alibaba Cloud Function Compute

This guide uses the third-party adapter rwv/hono-alibaba-cloud-fc3-adapter to run HttpRouter on Alibaba Cloud Function Compute.

Analog.js

Analog.js API routes are powered by Nitro and h3. Use toWebRequest from h3 to convert the incoming event to a standard Request.

AWS Lambda

Use the hono/aws-lambda adapter to wrap HttpRouter for AWS Lambda.

AWS Lambda@Edge

Use the hono/lambda-edge adapter to run HttpRouter on Lambda@Edge with CloudFront.

Azure Functions

Use the Azure Functions Adapter to run HttpRouter on Azure Functions V4 with Node.js 18+.

Bun

Bun's Bun.serve() accepts a standard fetch handler directly.

Configuring HttpRouter adapters

HttpRouter is adapter-based: it delegates URL pattern matching to a Hono Router instance. Any existing Hono-compatible adapter can be used interchangeably with the HttpRouter class.

Creating HttpRouter adapters

HttpRouter relies on the Hono router adapter interface for URL pattern matching and request dispatching. It does not ship with a built-in router. Instead, you supply a Hono Router instance that satisfies the adapter interface.

Deno

Deno provides the native Deno.serve() function which accepts a standard fetch handler.

Fastly Compute

Use the @fastly/hono-fastly-compute adapter with the fire helper.

Google Cloud Run

Google Cloud Run runs containerized workloads. This guide assumes you have a Google Cloud account with billing enabled.

HTTP Router usage

The @daiso-tech/core/http-router component provides a framework-agnostic HTTP router built on top of the Hono router engine. It implements the Winter TC fetch object standard, which means it exposes a standard fetch(request): Response signature. This allows it to be integrated directly into any runtime or framework that supports the Fetch API — including Node.js, Bun, Deno, Cloudflare Workers, Next.js, Nuxt, SvelteKit, and more.

Intro

HttpRouter implements the WinterTC fetch standard, exposing a fetch(request Response | Promise method. This makes it compatible with any framework, runtime, or platform adapter that accepts a standard fetch handler.

Netlify

Use the hono/netlify adapter to wrap HttpRouter for Netlify Edge Functions.

Node.js

Use the @hono/node-server adapter to serve HttpRouter on Node.js.

Nuxt

HttpRouter integrates with Nuxt server routes via Nitro and h3. Use toWebRequest from h3 to convert the incoming event to a standard Request.

SolidStart

SolidStart supports fetch-based route handlers natively.

SvelteKit

HttpRouter works with SvelteKit server endpoints via the standard Request/Response API.

TanStack Start

TanStack Start uses Vinxi under the hood and supports standard fetch handlers.

Vercel

Deploy HttpRouter to Vercel serverless or edge functions by exporting the default fetch handler.