Skip to content
/ try-supabase Public template

Template repository for Supabase development

Notifications You must be signed in to change notification settings

thaod/try-supabase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Try Supabase development

Local dev

Setup

  • Docker
  • Supabase CLI
  • Deno CLI

Run project

  1. On root repo, execute:
supabase start

Supabase will setup Docker containers. When finish, Supabase access info will be printed to console. With docker ps, you will see containers running as below screenshot.

See section Development Guide > Develop Edge Function for starting Supabase function.

  1. Access:
  1. Editor:
  • Use any SQL client connect to Postgres URL.
  • Or edit directly on Supabase Studio.

SQL client suggestions:

  1. Commit changes to create database migration

After any update, execute supabase db commit <change_name> to create migration.

Development guide

Database migrations

Preview changes

supabase db changes

Seeds data

  1. Add seed INSERT statement in supabase/seed.sql.
  2. Rerun migration and seed scripts supabase db reset.

Develop Edge Function

New function

supabase functions new <func-name>

Run function locally (with .env)

supabase functions serve <func-name> --env-file .env

Setup

Deployment

Push database change

  1. Preview changes: supabase db push [--dry-run]
  2. Push changes: supabase db push

Deploy functions

supabase functions deploy <func-name>

Ex:

supabase functions deploy hello

Deploy ENV

supabase secrets set --env-file <path-to-dotenv-file>

About

Template repository for Supabase development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published