Repository navigation
KSN: run the dev server against local or production Supabase - #45
Merged
Merged
Conversation
- add `resolveSupabaseTarget`, override only when URL and key are both set - fall back to `PRODUCTION_SUPABASE_URL` and key otherwise - test production fallback, half-set and empty overrides
- `supabase init` with `project_id = "kasane"` - gitignore `supabase/.snapshots` for copied production data
- `scripts/dev.sh local` starts Docker and `supabase start` - copy production `public` and `auth` data into local via `SUPABASE_DB_URL` - load after `db reset` in one transaction; `--keep` skips the copy - `production` runs `expo start` with the overrides unset - pass `--clear` when the target changes; `build:web` always clears
- document `local` vs `production`, setup of `scripts/.env.local` - cover Metro cache inlining, troubleshooting, and register in `CLAUDE.md`
✅ Deploy Preview for kasane-guide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bun run dev:local: starts local Supabase in Docker, copies productionpublic+authdata into it, serves the app against127.0.0.1:54321bun run dev:local -- --keep: reuse local data, skip the copybun run dev:production: serves against production, imports nothingresolveSupabaseTargetusesEXPO_PUBLIC_SUPABASE_*only when both are set, else productionbuild:webnow passes--clearso Metro cannot inline a cached local URL into a production exportSUPABASE_DB_URLinscripts/.env.local(gitignored)dev-serverskill documents setup and troubleshooting