-
Notifications
You must be signed in to change notification settings - Fork 143
chore: fix local dev server port assignments #1635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
drive by comment:
Claude code had a fun suggestion with a little easter egg: use 8260, 8261, etc - the |
|
|
@CharlieHelps can you make these updates. 1. set ports to 826* instead of 300* 2. remove the kill process. Just assume they have killed the process before running again (fixes the lsof, issue). |
|
Investigating this PR now and I’m likely to update the dev server scripts to use the 826* ports and drop the explicit kill-process step as requested.
|
Expand this to see my work.
|
|
Updated the local dev port scheme to Changes
Commits: Verification# ESLint: 13/13 tasks successful
npm run lint
# TypeScript: 13/13 tasks successful
npm run check-types
# Tests: 9/9 tasks successful
npm testreviewChanges skipped: |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The port standardization looks consistent, but scripts/dev-local.sh has several reliability/diagnostics problems: the port probe may miss collisions due to interface/IPv6 differences, Docker/Supabase readiness checks are brittle (especially greping supabase status), and migration failures are silently ignored. apps/api/src/main.ts also duplicates the port expression, which should be single-sourced in the boot path. Addressing these will make the “one command” local bootstrap significantly more deterministic and debuggable.
Summary of changes
Summary
This PR standardizes local development port assignments across the monorepo and adds a convenience bootstrap script.
Port standardization to 826x
- Updated default local ports in env/examples and docs:
- API:
PORT=8261inapps/api/.env.example - Web:
http://localhost:8260inapps/web/.env.example(NEXTAUTH_URL) and docs
- API:
- Updated Next.js dev scripts to bind to explicit ports:
apps/web/package.json:next dev -p 8260showcase/package.json:next dev -p 8262docs/package.json:next dev --turbo -p 8263
- Updated web URL fallbacks to use
localhost:8260:apps/web/app/robots.ts,apps/web/app/sitemap.ts,apps/web/lib/config.tsx
- Updated tests that assert localhost URL defaults to match the new port:
apps/web/lib/urlSecurity.test.ts,apps/web/lib/utils.test.ts
Supabase redirect allowlist alignment
- Updated
supabase/config.tomlauth URLs to match the new local web port (8260) and added a “keep in sync” comment.
Local dev bootstrap
- Added
scripts/dev-local.shto:- Fail fast if ports
8260–8263are already occupied (via an inline Nodenode:netbind probe) - Start Postgres via Docker Compose
- Start Supabase via
npx --yes supabase ... - Run DB migrations
- Start all dev servers via the new root script
dev:cloud:full
- Fail fast if ports
Root scripts
- Added
dev:cloud:full,dev:local, anddev:docsscripts in the rootpackage.jsonfor streamlined local workflows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Main concern is the new scripts/dev-local.sh reliability/diagnostics: the Docker readiness check is brittle, migration failures are silently ignored, and the port probe can miss collisions due to interface/IPv6 differences. Also, apps/api/src/main.ts duplicates the port expression in a central boot path, which is easy to single-source. Addressing these will make the “one command” local bootstrap more deterministic and significantly easier to troubleshoot.
Summary of changes
Summary
This PR standardizes local development ports across the monorepo and adds a local bootstrap script.
Port standardization to 826x
- API default port updated to
8261inapps/api/.env.exampleandapps/api/src/main.ts. - Web default URLs updated to
8260across:apps/web/.env.example(NEXTAUTH_URL,NEXT_PUBLIC_TAMBO_API_URL)apps/web/README.md- Next metadata routes:
apps/web/app/robots.ts,apps/web/app/sitemap.ts apps/web/lib/config.tsxand related tests.
- Next.js dev scripts now bind explicitly:
apps/web/package.json:next dev -p 8260showcase/package.json:next dev -p 8262docs/package.json:next dev --turbo -p 8263
Supabase redirect allowlist alignment
supabase/config.tomlauth redirect URLs updated tohttp://localhost:8260/https://127.0.0.1:8260and annotated with a “keep in sync” comment.
Local bootstrap script
- Added
scripts/dev-local.shto:- Fail fast if ports
8260–8263are in use (inline Nodenode:netprobe) - Start Postgres via Docker Compose
- Start Supabase via
npx --yes supabase ...and check status via JSON - Run DB migrations
- Start all dev servers via root
dev:cloud:full.
- Fail fast if ports
Root scripts
- Added
dev:cloud:full,dev:local, anddev:docsto the rootpackage.json.
No description provided.