Skip to content

feat(serve-static): support absolute path for root#202

Closed
yusukebe wants to merge 3 commits into
mainfrom
feat/serve-static-absolute-root
Closed

feat(serve-static): support absolute path for root#202
yusukebe wants to merge 3 commits into
mainfrom
feat/serve-static-absolute-root

Conversation

@yusukebe

Copy link
Copy Markdown
Member

This PR enables the serve static to support an absolute path for the root option.

import { serveStatic } from '@hono/node-server'
import { serve } from '@hono/node-server/serve-static'
import { Hono } from 'hono'

const app = new Hono()
app.use('/static/*', serveStatic({ root: '/home/yusuke/app' }))

serve(app)

Closes #187
Related to honojs/hono#3420

@yusukebe

Copy link
Copy Markdown
Member Author

Hey @usualoma !

Can you review this?

@yusukebe

yusukebe commented Oct 1, 2024

Copy link
Copy Markdown
Member Author

@usualoma

I have some thoughts related to #203 and we don't have to hurry to merge this because this PR may be not needed. So, please don't review this now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add support for absolute path to serveStatic root

1 participant