Closed ghost closed 4 years ago
For example: sirv('../assets', { accessPath: 'assets' }). This should allow requests to Express.js to access the '../assets' directory using 'assets'. As is, without this option, I get 404.
sirv('../assets', { accessPath: 'assets' })
Sirv is a middleware, not a router. You use Express/Polka to setup the router.
app() .use('/assets', sirv('/path/to/assets')) // ...
Hope that helps~
For example:
sirv('../assets', { accessPath: 'assets' })
. This should allow requests to Express.js to access the '../assets' directory using 'assets'. As is, without this option, I get 404.