The API server supports Hot Module Replacement (HMR), so it automatically restarts when code changes.
In the local development environment, the API server integrates and serves the Web app. It
connects the Web directory’s Vite Dev Server as middleware to the API server, allowing everything
to run on a single port.
Keep this terminal window open. It maintains the running API server.
3
Run Web Server (Optional)
If you want to focus on Web development or utilize Vite’s full features, open a new terminal window and start the development server separately in the web directory:
cd myapp/packages/webpnpm dev
Vite startup logs after running pnpm dev in web directory
When the Vite development server starts, you’ll see the following message:
VITE v5.x.x ready in xxx ms ➜ Local: http://localhost:5173/ ➜ Network: http://192.168.x.x:5173/
If you run the Web server separately, you can access the frontend at http://localhost:5173. The Web server automatically proxies /api/* path requests to the API server (localhost:34900).
Two Development Modes
Integrated mode (recommended): Run only API server → Access everything at localhost:34900
Separated mode: Run API + Web separately → API at localhost:34900, Web at localhost:5173
The integrated mode is sufficient for most cases. Use separated mode only when focusing on Web development.