how do I tell FileRoutes to look for a folder other than `routes`?

I have a solid start node instance handling multiple domains this means I need multiple <FileRoutes/> configured with different routes folders and then on request look at the domain and use the associated <FileRoutes/> for that domain
1 Reply
Samual 🦢
Samual 🦢•15mo ago
I've achieved what I wanted with this middleware
({ forward }) => event => {
const url = new URL(event.request.url)

url.pathname = url.hostname + url.pathname;
event.request = new Request(url, event.request)

return forward(event)
}
({ forward }) => event => {
const url = new URL(event.request.url)

url.pathname = url.hostname + url.pathname;
event.request = new Request(url, event.request)

return forward(event)
}