/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-serve-static-files-2ddaa6b15818-serve-static-files-s0458-c0002.md
Serve static files (3) - hono-docs
Serve static files (3) Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt serve static files Summary...
Serve static files (3)
Source evidence: /Sources/raw/honojshono/honojshono.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' }))