SolidJSS
SolidJSโ€ข8mo agoโ€ข
4 replies
slim (jamesc)

[SolidStart] Add another static file directory

What is the easiest way to add another static file directory like /public?

SolidStart app.config.ts says it configures Vinxi: https://docs.solidjs.com/solid-start/reference/entrypoints/app-config
And Vinxi has a "static" option: https://vinxi.vercel.app/api/router/static.html

Although defineConfig seems to have plenty of TypeScript support, and SolidStart says this will work, I can't figure out where to configure this additional path in vinxi in app.config.ts. Alternativly, I started to use the npm serve package in middleware.ts but I got hung up on what to return (serve takes the request and response and does not return any value, so I can't tell SolidStart's middle ware to stop processing requests I am done).
Documentation for SolidJS, the signals-powered UI framework
Vinxi Documentation
Was this page helpful?