Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Dynamic routes with Supabase? #31

Open
liamcharmer opened this issue Mar 1, 2023 · 1 comment
Open

Dynamic routes with Supabase? #31

liamcharmer opened this issue Mar 1, 2023 · 1 comment

Comments

@liamcharmer
Copy link

Is it possible with the supabase module, to get the data from there, to implement as dynamic routes?

@Pierre-M
Copy link

You can totally do that by :

  • creating a dedicated api route, let's say /api/sitemap
  • query all the data you want inside that event handler and return you routes from there
  • use the routes param in sitemap config and query your previously created endpoint
{
  routes: () => $fetch("/api/sitemap")
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants