🔋 Supabase
Remote database setup
Supabase Setup
- Sign up for a Supabase account
- Create a new project
- Make sure to save your database password
- In your project dashboard, go to
Settings
>API
- Copy your
Project URL
withanon
public andservice_role
secret API keys.
You'll need to add these to your environment variables: (.env file)
NEXT_PUBLIC_SUPABASE_URL=your_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_public_api_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
Login to Supabase
npx supabase login
Link your project
Enter this command and select the project you want to link
npx supabase link
Push your schema
You will be prompted to enter your Database password
npx supabase db push
Well done! You have successfully setup your Supabase database.