/Knowledge/sources/honojs__hono/llms-full/node-js-serve-static-files--part-03--544153b62c38.md
Node.js: Serve static files (part 03) - hono-docs
Node.js: Serve static files (part 03) Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt serve static fil...
Node.js: Serve static files (part 03)
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#serve-static-files
Summary
::: Use the path option to serve favicon.ico in the directory root: ts app.use('/favicon.ico', serveStatic({ path: './favicon.ico' })) If a request to the path /hello.txt or /image.png comes in and you want to return a fil...
Content
:::
Use the path option to serve favicon.ico in the directory root:
app.use('/favicon.ico', serveStatic({ path: './favicon.ico' }))
If a request to the path /hello.txt or /image.png comes in and you want to return a file named ./static/hello.txt or ./static/image.png, you can use the following:
app.use('*', serveStatic({ root: './static' }))
Metadata
{
"chunk_index": 2,
"citation": "https://hono.dev/llms-full.txt#serve-static-files",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Node.js > Serve static files (3)",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 458,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Node.js: Serve static files (part 03)",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}