Skip to content

ATXP-260: Switch demo to single server and use npm run#8

Merged
robdimarco-atxp merged 3 commits intomainfrom
robdimarco/atxp-260-switch-demo-app-to-only-have-a-single-server-and-use-npm-run
Sep 10, 2025
Merged

ATXP-260: Switch demo to single server and use npm run#8
robdimarco-atxp merged 3 commits intomainfrom
robdimarco/atxp-260-switch-demo-app-to-only-have-a-single-server-and-use-npm-run

Conversation

@robdimarco-atxp
Copy link
Copy Markdown
Contributor

@robdimarco-atxp robdimarco-atxp commented Sep 10, 2025

Summary

  • Fix git divergent branches error by replacing git pull with fetch + reset --hard
  • Refactor demo to use single port instead of frontend/backend ports
  • Remove .env file creation logic, using environment variables passed directly
  • Update CLI args to use --port/-p with default 8017
  • Aligns with new unified server architecture

Changes

  • Replace git pull with git fetch + git reset --hard origin/main to avoid divergent branch conflicts
  • Update DemoOptions interface to use single port instead of frontendPort and backendPort
  • Change CLI argument parsing from --frontend-port/--backend-port to --port/-p
  • Remove createEnvFiles function and calls - demo now uses environment variables passed directly
  • Update startDemo function to use single port for all operations
  • Simplify browser opening and logging to reference single port

Test plan

  • Test npm run dev demo works without git errors
  • Test npm run dev demo --port 3000 uses custom port
  • Test npm run dev demo --verbose shows detailed logs
  • Verify demo opens browser to correct port
  • Confirm no .env files are created in demo directory

Closes ATXP-260

🤖 Generated with Claude Code

robdimarco-atxp and others added 3 commits September 10, 2025 09:46
Replace git pull with fetch + reset --hard to avoid divergent branch conflicts.
This ensures the demo repository always matches the remote exactly, discarding
any local changes that might have been made during demo usage.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace frontendPort and backendPort with single port parameter
- Update CLI args to use --port/-p instead of --frontend-port/--backend-port
- Default port changed to 8017 (previously backend port)
- Simplify .env file creation to single root .env instead of separate files
- Update environment variables and browser opening to use single port
- Aligns with new architecture of unified server handling both frontend and backend

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
The demo server no longer needs .env files as it will use environment
variables passed directly through the spawn process. This simplifies
the demo setup and aligns with the unified server architecture.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@robdimarco-atxp robdimarco-atxp merged commit 63ad2d2 into main Sep 10, 2025
1 check passed
@robdimarco-atxp robdimarco-atxp deleted the robdimarco/atxp-260-switch-demo-app-to-only-have-a-single-server-and-use-npm-run branch September 10, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant