---
title: "App Presets Configuration"
description: "Hono allows you to customize how your application behaves through initialization options, strict path routing, and lightweight minimal router presets. By selecting specific router presets or config..."
last_updated: "2026-10-12T08:15:16.327396+00:00"
canonical_url: "https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/configuration/app-presets-configuration"
---

## Overview

Hono allows you to customize how your application behaves through initialization options, strict path routing, and lightweight minimal router presets. By selecting specific router presets or configuring options when creating your Hono instance, you can optimize your app for performance, bundle size, or specific path-matching rules.

> [!NOTE]
> Hono defaults to a smart router setup combining `RegExpRouter` and `TrieRouter` for general use cases.

---

## Configuration Options

### Initialization and Settings

When initializing a standard Hono application, you can pass an options object to customize routing behavior and path resolution.

| Option Key | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `strict` | `boolean` | `true` | Controls whether trailing slashes are treated as distinct paths. |
| `router` | `Router` | `undefined` | A custom router instance to handle route matching. |
| `getPath` | `Function` | `undefined` | A custom function to extract the path from incoming requests. |

### Strict Path Routing

By default, `strict` routing is enabled (`true`), meaning a route defined as `/hello` will not match a request to `/hello/`. You can disable strict path routing by setting `strict: false`.

```typescript
import { Hono } from 'hono'

// Disable strict path routing (trailing slashes are treated equivalently)
const app = new Hono({ strict: false })

app.get('/hello', (c) => c.text('Hello!'))
```

---

## Minimal Presets: Tiny and Quick

### Preset Selection

If you want to reduce your application's bundle size or target specific router algorithms, Hono provides minimal entry points: `hono/tiny` and `hono/quick`.

### Using `hono/tiny`

The `hono/tiny` preset uses `PatternRouter`, which is lightweight and well-suited for minimal bundle footprints.

```typescript
import { Hono } from 'hono/tiny'

const app = new Hono()

app.get('/tiny', (c) => c.text('Running with PatternRouter'))

export default app
```

### Using `hono/quick`

The `hono/quick` preset uses a `SmartRouter` configured with `LinearRouter` and `TrieRouter`.

```typescript
import { Hono } from 'hono/quick'

const app = new Hono()

app.get('/quick', (c) => c.text('Running with Linear and Trie routers'))

export default app
```

---

## Supported Routers

Hono includes several internal routers that can be supplied via the `router` option or used within custom presets.

| Router Identifier | Description |
| :--- | :--- |
| `RegExpRouter` | Matches routes using regular expressions. |
| `TrieRouter` | Matches routes using a tree data structure. |
| `SmartRouter` | Automatically selects the best underlying router based on registered routes. |
| `PatternRouter` | Lightweight pattern-matching router used in `hono/tiny`. |
| `LinearRouter` | Linear search router used alongside `TrieRouter` in `hono/quick`. |

Sources: `src/hono.ts`, `src/preset/tiny.ts`, `src/preset/quick.ts`, `src/router/reg-exp-router/index.ts`, `src/router/smart-router/index.ts`, `src/router/trie-router/index.ts`, `src/router/pattern-router/index.ts`, `src/router/linear-router/index.ts`.

---

## Customizing with Factory

You can also pre-configure default application options using the `Factory` helper when generating multiple application instances.

```typescript
import { Factory } from 'hono/factory'

const factory = new Factory({
  defaultAppOptions: {
    strict: false,
  },
})

const app = factory.createApp()
```

> [!TIP]
> Use `hono/tiny` when building applications for edge environments where bundle size is strictly constrained.

## Related

- [Runtime Adapters](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/configuration/runtime-adapters)
- [Routing and Handlers](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/getting-started/routing-and-handlers)


## Sitemap

See the full [sitemap](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/llms.txt) for all pages in this wiki.
