Conversation
- Fix APP_ROOT depth in server/src/config/index.ts (was server/ not repo root) - Add built frontend serving and SPA fallback to Express server - start-all.sh: build frontend, start single server on port 3001 - .env.example: remove placeholder ACESTEP_BIN/ACESTEP_MODEL/FRONTEND_URL - setup.sh: fix misleading 'edit .env' next steps output - stop-all.sh: use logs/server.pid, keep legacy PIDs for upgrade compat - start-all.bat: rewrite Windows script for single-server approach - README.md: update quick start, usage, config, troubleshooting docs Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor to use a single server for both API and UI
Consolidate dual-server setup into single Express server; fix binary auto-detection
Mar 7, 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.
Two issues:
start-all.shlaunched both a Vite dev server (5173) and an Express API server (3001), forcing users to juggle two ports. Additionally,.env.examplehardcoded placeholderACESTEP_BIN=/path/to/acestep-generate, triggering a startup warning on every fresh clone even though the server already auto-detects binaries from./bin/.Bug fix:
APP_ROOTwrong depthserver/src/config/index.tslived atserver/src/config/but resolvedAPP_ROOTwith'../..', landing atserver/instead of the repo root. Binary detection was silently checkingserver/bin/ace-qwen3(never exists) instead ofbin/ace-qwen3(wherebuild.shinstalls them).Single-server: Express serves the built frontend
Added SPA static serving to
server/src/index.ts.index.htmlis read once at startup and served from memory for all unmatched non-API routes:start-all.sh/start-all.batnpm run buildbefore starting the serverhttp://localhost:3001logs/server.pid;stop-all.shhandles both new and legacy PID filesConfig / env cleanup
.env.exampleandserver/.env.example: removedACESTEP_BIN,ACESTEP_MODEL,FRONTEND_URL,VITE_API_URLplaceholders — all auto-detectedserver/src/config/index.ts:frontendUrldefaults tohttp://localhost:<PORT>(same origin); extractedresolvedPortconstant to eliminate the duplicated'3001'literalsetup.sh: "Next steps" no longer instructs users to manually edit.envREADME.md: updated quick start (3 steps, not 4), usage table, config reference, troubleshooting🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.