Passer à la navigation

Commencer

Ce tutoriel démontrera comment démarrer Supabase à partir de zéro, ainsi que comment démarrer les fonctions Edge.

  1. Cloné capgo
  2. Supabase

Pour démarrer, exécutez

Fenêtre de terminal
supabase start

La prochaine fois, vous devriez voir quelque chose comme cela :

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

La prochaine fois, ouvrez configs.json et configurez les valeurs suivantes :

{
"base_domain": {
"prod": "console.capgo.app",
"development": "development.console.capgo.app",
"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"
}
}

supa_key_anon est la valeur du pas précédent.

Vérifiez ensuite que vous pouvez vous rendre sur localhost:54323 et que la table users semble ressembler à ceci

Tableau de bord Supabase affichant la table utilisateurs

Si cela fonctionne, démarrez les fonctions Edge en exécutant :

Fenêtre de terminal
supabase functions serve

et démarrez le frontend en exécutant :

Fenêtre de terminal
bun run serve