Richi
Richi

Reputation: 566

Is there a way to connect react to local supabase

I just followed the supabase documentation to create a local environment in supabase. The problem I have is that already having a project in react, is there a way for me to start using that environment? I have configured my client.js with the environments given by supabase in local environment. ie:

And my other question is when I point to the db that I already have in production in the local environment, it only brought me the tables but not the data from them. Is there any possibility?

Upvotes: 0

Views: 740

Answers (1)

thorwebdev
thorwebdev

Reputation: 1152

You can either use something like pgdump e.g. see the Supabase docs or you can seed some fake data in your local Supabase project with something like SeedAI.

To dump your data, you can use supabase db dump --data-only [email protected], see https://supabase.com/docs/reference/cli/supabase-db-dump . The output from this you can put in your local supabase/seed.sql file.

Upvotes: 0

Related Questions