Handle routes for multiple domains using Fresh and Deno
How should we maintain multiple routes of multiple sub domains using fresh and deno? As per documentation we need to add all our routes inside routes folder. but what if we want to maintain routes per domain per feature? Is it possible?
6 Replies
@marvinh. Can you please help us here?
Fresh's routing is solely based on path names. It doesn't take subdomains into account
I'm not aware of a workaround for that
ok thanks for clarity
can you help us to define routes per subdomain for folder structure like below
we tried to find how to set routes folders for sub domains like above in fresh but didnt get anything.
I'd treat each domain as a separate Fresh app and have the top level router route to them
can you help me to define top level router to route to them? and how deno project should connect? we want to have only one deno project for this
Probably something like this: