examples/

directory
v1.219.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: MIT

README

Code examples using CLI library

The examples in this directory demonstrate the minimal code to get started with building your own tools for managing Supabase projects. If you are a 3rd party service provider looking for ways to integrate with Supabase user projects, you may want to use the building blocks provided by this library.

All examples come with an entrypoint that you can build and run locally.

Deploy functions

# Place your functions under supabase/functions
export SUPABASE_PROJECT_ID="zeoxvqpvpyrxygmmatng"
export SUPABASE_ACCESS_TOKEN="sbp_..."
go run examples/deploy-functions/main.go

Migrate database

# Place your schemas under supabase/migrations
export PGHOST="db.zeoxvqpvpyrxygmmatng.supabase.co"
export PGPORT="5432"
export PGUSER="postgres"
export PGPASS="<your-password>"
export PGDATABASE="postgres"
go run examples/migrate-database/main.go

Seed storage buckets

export SUPABASE_PROJECT_ID="zeoxvqpvpyrxygmmatng"
export SUPABASE_SERVICE_ROLE_KEY="eyJh..."
go run examples/migrate-database/main.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL