/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-createfactory-85b264e70e0d-createfactory-s0657-c0000.md
`createFactory()` - hono-docs
createFactory() Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt createfactory Summary createFacto...
createFactory()
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#createfactory
Summary
createFactory() will create an instance of the Factory class. ts import { createFactory } from 'hono/factory' const factory = createFactory() You can pass your Env types as Generics: ```ts type Env = { Variables: { foo: string }...
Content
createFactory() will create an instance of the Factory class.
import { createFactory } from 'hono/factory'
const factory = createFactory()You can pass your Env types as Generics:
type Env = {
Variables: {
foo: string
}
}
const factory = createFactory<Env>()