Skip to content

fix: improve dev backend startup reliability - #86

Open
UttamPachauri wants to merge 1 commit into
vicharanashala:mainfrom
UttamPachauri:fix/dev-backend-reliability
Open

fix: improve dev backend startup reliability#86
UttamPachauri wants to merge 1 commit into
vicharanashala:mainfrom
UttamPachauri:fix/dev-backend-reliability

Conversation

@UttamPachauri

Copy link
Copy Markdown

Summary

This PR improves the reliability of the local development startup script by adding validation, configurable startup options, and better process management.

Changes Made

  • Added configurable ports using MAIN_API_PORT and LEVELS_API_PORT environment variables.
  • Added support for --main-only and --levels-only startup flags.
  • Added validation to ensure the levels backend contains a valid package.json before startup.
  • Refactored service startup into a reusable spawnService() helper.
  • Improved startup logging for better developer experience.
  • Added graceful shutdown protection to prevent duplicate termination.
  • Improved error reporting when development services fail to start.

Benefits

  • Makes the development workflow more reliable.
  • Prevents invalid startup configurations.
  • Improves debugging with clearer startup and error messages.
  • Allows developers to start only the required backend service.
  • Reduces duplicate startup and shutdown logic.

Testing

  • Verified default startup flow.
  • Tested custom port configuration using environment variables.
  • Tested --main-only and --levels-only flags.
  • Verified validation when the levels backend configuration is invalid.
  • Confirmed existing startup behavior remains unchanged.

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