Manage the CardMaker dev servers. The argument determines the action:
- •
start(default if no argument): start both servers - •
stop: stop both servers - •
restart: stop then start both servers - •
electron: build and launch the Electron desktop app in dev mode
Stop Procedure
- •Find processes on ports 3001, 5173, and 5174:
bash
netstat -ano | findstr "LISTENING" | findstr ":3001 :5173 :5174"
- •Kill each found PID:
Usebash
taskkill //PID <pid> //F
//PIDnot/PID(Git Bash on Windows).
Start Procedure
- •
First run the stop procedure to clear stale processes.
- •
Start the server as a background process:
bashcd /c/Users/mikes/Documents/CardMaker/server && npx tsx src/index.ts
Wait for it to print "Cardstock server running on http://localhost:3001" before proceeding.
- •
Start the client as a background process:
bashcd /c/Users/mikes/Documents/CardMaker/client && npx vite
Report the status of both processes when done.
Electron Procedure
- •
First run the stop procedure to clear stale processes.
- •
Build everything:
bashcd /c/Users/mikes/Documents/CardMaker && npm run build:electron
- •
Launch Electron in dev mode:
bashcd /c/Users/mikes/Documents/CardMaker && npx electron .
Important Notes
- •Do NOT use
npm run dev(concurrently) — tsx watch often fails silently under it. - •Server runs on port 3001, client on port 5173.
- •Client proxies
/apiand/outputto the server automatically. - •Electron mode builds all workspaces and launches the desktop app (no separate Vite process needed).