Zum Inhalt springen

Iniziamo

Was behandelt dieses Tutorial?

Dieses Tutorial zeigt, wie man Supabase von Grund auf startet und Edge Functions einrichtet.

Voraussetzungen

  1. Geklontes capgo
  2. supabase

Erste Schritte

Zum Starten führen Sie aus:

Terminal-Fenster
supabase start

Als Nächstes sollten Sie etwa Folgendes sehen:

Started supabase local development setup
API URL: http://localhost:54321
GraphQL URL: http://localhost:54321/graphql/v1
DB URL: postgresql://postgres:postgres@localhost:54322/postgres
Studio URL: http://localhost:54323
Inbucket URL: http://localhost:54324
JWT secret: [truncated]
anon key: supa_key_anon
service_role key: supa_key_admin

Öffnen Sie als Nächstes configsjson und setzen Sie die folgenden Werte:

{
"base_domain": {
"prod": "webcapgoapp",
"development": "developmentwebcapgoapp",
"local": "localhost:3332"
},
"supa_anon": {
"prod": "supa_key_anon",
"development": "supa_key_anon",
"local": "supa_key_anon"
},
"supa_url": {
"prod": "http://localhost:54321",
"development": "http://localhost:54321",
"local": "http://localhost:54321"
}
}

wobei supa_key_anon der Wert aus dem vorherigen Schritt ist

Überprüfen Sie als Nächstes, ob Sie localhost:54323 aufrufen können und ob die Tabelle users etwa so aussieht

Wenn ja, starten Sie Edge Functions mit:

Terminal-Fenster
supabase functions serve

und starten Sie das Frontend mit:

Terminal-Fenster
bun run serve