Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

yusukebe
Copy link
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
Member Author

Hey @usualoma !

Can you review this?

@yusukebe
Copy link
Member Author

yusukebe commented Oct 1, 2024

@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