/Wiki/sources/honojs__hono/2026/https-raw-githubusercontent-com-honojs-examples--aca3a05722b1-setting-up-an-api-client-via-hono-middleware-s0000-c0000.md
Setting up an API Client via Hono middleware. - hono-docs
Setting up an API Client via Hono middleware. Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://raw.githubusercontent.com/...
Setting up an API Client via Hono middleware.
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://raw.githubusercontent.com/honojs/examples/main/env-vars/README.md#setting-up-an-api-client-via-hono-middleware
Summary
Author: @dalanmiller This example shows how to set up an API Client (Stripe) prior to handling a request. Doing this in Typescript requires some specific configuration when instantiating the Hono app....
Content
Author: @dalanmiller
This example shows how to set up an API Client (Stripe) prior to handling a request.
Doing this in Typescript requires some specific configuration when instantiating
the Hono app. So this example shows how to modify the
Hono app instantiation Hono() in Typescript to
work correctly with introduced
environment variables and
session variables.
Per the Cloudflare docs on
using Secrets with Workers
make sure you add a .dev.vars file which includes the following:
LIVEMODE=false
STRIPE_TK=<YOUR_STRIPE_TESTMODE_KEY>