feat(dev): base44 dev --remote — local frontend against the production backend - #588
Merged
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.1.7-pr.588.7702fbbPrefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.1.7-pr.588.7702fbb"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.1.7-pr.588.7702fbb"
}
}
Preview published to npm registry — try new features instantly! |
…ction backend --remote runs site.serveCommand with VITE_BASE44_APP_ID and VITE_BASE44_APP_BASE_URL pointing at the app's own published URL, without starting the local backend. It reuses the serveCommand runner local dev uses; the only differences are the URL and that nothing else starts. Config errors beat network errors: a missing site.serveCommand is reported before the published URL is fetched, and an unpublished app fails rather than falling back to the shared host. --port is rejected — it configures the local backend, which --remote does not start. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
davidsu
force-pushed
the
feat/dev-remote
branch
from
August 3, 2026 13:19
d5b6e5f to
e101039
Compare
yardend-wix
approved these changes
Aug 4, 2026
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.
Note
Description
Adds a
--remoteflag tobase44 devthat runs the project'ssite.serveCommandlocally while pointing it at the app's published backend instead of spinning up a local dev server. This lets you iterate on the frontend against real production data without running a local backend. The flag is mutually exclusive with--port, and the command fails fast when the project has nosite.serveCommandor the app has no published URL.Related Issue
None
Type of Change
Changes Made
--remoteflag onbase44 dev(packages/cli/src/cli/commands/dev.ts): resolves the app's published site URL viagetSiteUrl()and startssite.serveCommandwithVITE_BASE44_APP_IDandVITE_BASE44_APP_BASE_URLpointing at the live app, skippingcreateDevServer()entirely.validateDevOptionsnow rejects--remote --portwith"--port applies to the local backend, which --remote does not start.";--remotewithout asite.serveCommandthrows aConfigInvalidErrorexplaining the requirement.dev.ts: split the olddevActionintolocalDevAction/remoteDevActionbehind a thin dispatcher; replacedcreateConfiguredServeRunnerwith a config-onlyresolveConfiguredSitehelper (returning aConfiguredSitepick of the runner options) so both paths share config resolution but construct their own runner; extractedstopRunnerOnProcessSignalsfor the shared SIGINT/SIGTERM teardown.ServeCommandRunnerOptionsfromserve-command-runner.tssodev.tscan deriveConfiguredSitefrom it.packages/cli/tests/cli/dev.spec.ts): 5 new cases covering the happy path (serve command receives the published URL, no local backend started), missing published URL,--remote+--portrejection, missingsite.serveCommand, and non-zero exit when the frontend exits.Added.Testing
npm test)Checklist
docs/(AGENTS.md) if I made architectural changesAdditional Notes
docs/changes were needed: the guides underdocs/are architectural topic guides, and the command factory /runCommandpatterns are unchanged. User-facing behavior is captured in the CHANGELOG.process.exit(code ?? 1)inrunner.onExitto mirror the frontend's exit code, matching the existing local-path teardown behavior instartServeCommand.--remote)base44 devbehavior is untouched — the refactor is behavior-preserving for the local path.bun run typecheck/bun run testwere not permitted here), so the two verification boxes above are left unchecked.🤖 Generated by Claude | 2026-08-03 13:20 UTC | 7702fbb