/Knowledge/sources/honojs__hono/llms-full/bun-change-port-number--a0344261ce11.md
Bun: Change port number - hono-docs
Bun: Change port number Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt change port number Summary You...
Bun: Change port number
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#change-port-number
Summary
You can specify the port number with exporting the port. ```ts import { Hono } from 'hono' const app = new Hono() app.get('/', (c) => c.text('Hello Bun!')) export default app // [!code --] export default { // [!code ++] port: 3000, //...
Content
You can specify the port number with exporting the port.
import { Hono } from 'hono'
const app = new Hono()
app.get('/', (c) => c.text('Hello Bun!'))
export default app // [!code --]
export default { // [!code ++]
port: 3000, // [!code ++]
fetch: app.fetch, // [!code ++]
} // [!code ++]
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#change-port-number",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Bun > Change port number",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 412,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Bun: Change port number",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}