Setup Supabase
Setup backend
- Setup NextJS and Supabase
- Go to Project Settings > API. Then copy the project url and anon key into the variables
NEXT_PUBLIC_SUPABASE_URL
andNEXT_PUBLIC_SUPABASE_ANON_KEY
respectively in thenextjs/.env
file.
NEXT_PUBLIC_SUPABASE_URL="https://crnytzptlghehxsarjxm.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNybnl0enB0bGdoZWh4c2FyanhtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MDkyMjQxNjgsImV4cCI6MjAyNDgwMDE2OH0.UW1dHRt4hGF6uCdPXimxv0Ggwq5uJ1WoQuCZ1_ixmCU"
- Now running the local development server will connect to your Supabase backend
cd nextjs
npm run
Local Setup (Optional)
- Setup local Supabase
- Copy local environment file
cd nextjs
cp .env.local.example .env.local
- Run the local development server
npm run
note
.env.local
variables will override the .env
variables when running nextjs locally. Click here for more info