node-server
node-server copied to clipboard
feat(serve-static): support absolute path for `root`
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 https://github.com/honojs/hono/pull/3420
Hey @usualoma !
Can you review this?
@usualoma
I have some thoughts related to https://github.com/honojs/node-server/issues/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!