# Bun Hono API

A Hono todo API reports its Bun version, answers health checks, and supports listing or adding todos. Tokay recognizes the Bun project and runs it as one Web Service.

Bring the same TypeScript entry point, package file, and lockfile you use during development. Tokay keeps Bun as the runtime instead of translating the app to Node.js.

## Facts

- Runtime: Bun
- Framework: Hono
- Service types: Web Service
- Resources: None
- Required secrets: None

## What it does

The root response shows the Bun version currently serving your API.

Fetch `/todos` for three sample tasks. Post a nonempty title and Hono returns the new item with a `201` status. Empty input receives a `400` response.

The `/health` route gives you a direct liveness check.

## Deploy it

Bring this folder to Tokay any way you like. Paste or upload it in the dashboard, push it with git, or hand it to your AI agent along with [our agent instructions](https://app.tokay.io/llms.txt). Tokay figures out the rest.

Working in Claude, ChatGPT, VS Code, or another MCP client? Connect the [Tokay MCP server](https://tokay.io/docs/platform-mcp) and ask your agent to deploy this example. It signs in through your browser, so there is no token to paste.

New to Tokay? The [getting started guide](https://tokay.io/getting-started) walks you through your first deploy.

## Try it

Create a todo at your live URL, then make sure the next list response contains it.

```sh
export APP_URL="https://your-app.tokay.app"
curl -X POST "$APP_URL/todos" \
  -H 'Content-Type: application/json' \
  -d '{"title":"ship the next thing"}'
curl "$APP_URL/todos"
```

The item appears while this instance is running. Deploy again and the list returns to its three samples because the starter does not include durable storage.

## How it works

You can keep Hono's fetch style handler and Bun start command. Tokay installs from the lockfile, provides `PORT`, and launches the TypeScript app with Bun.

## Secrets

You have no secrets to add. The example talks only to its callers.

## Grow from here

Browse the [Tokay examples catalog](/examples) when you want saved data or more than one Service.

## Source files

- [bun.lock](https://tokay.io/examples/src/bun-hono-api/bun.lock)
- [index.ts](https://tokay.io/examples/src/bun-hono-api/index.ts)
- [package.json](https://tokay.io/examples/src/bun-hono-api/package.json)

## Download and source

- [Download the complete project](https://tokay.io/examples/downloads/bun-hono-api.zip)
- Last updated: 2026-07-31
- Example revision: `52c7b7f`
- [View this revision on GitHub](https://github.com/tokayio/tokay-examples/tree/52c7b7ffd52e157375b08f1f11ff4fbe6c498642/bun-hono-api)
- [Deploy a Bun app](https://tokay.io/use-cases/deploy-bun)
