You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library per si is the base foundation to user Supabase services from Elixir, so to integrate with specific services you need to add each client library you want to use.
Copy file name to clipboardExpand all lines: lib/supabase/client.ex
+13-11
Original file line number
Diff line number
Diff line change
@@ -19,12 +19,12 @@ defmodule Supabase.Client do
19
19
To achieve this you can use the `Supabase.Client` module in your module:
20
20
21
21
defmodule MyApp.Supabase.Client do
22
-
use Supabase.Client
22
+
use Supabase.Client, otp_app: :my_app
23
23
end
24
24
25
25
This will automatically start an Agent process to manage the connection options for you. But for that to work, you need to configure your defined Supabase client in your `config.exs`:
Start an Agent process to manage the Supabase client instance.
128
130
@@ -131,12 +133,12 @@ defmodule Supabase.Client do
131
133
First, define your client module and use the `Supabase.Client` module:
132
134
133
135
defmodule MyApp.Supabase.Client do
134
-
use Supabase.Client
136
+
use Supabase.Client, otp_app: :my_app
135
137
end
136
138
137
139
Note that you need to configure it with your Supabase project details. You can do this by setting the `base_url` and `api_key` in your `config.exs` file:
0 commit comments