Start React dev server - access at http://localhost:4100
cd app
npm install
npm startServe production build locally with different backend environments:
cd app
# Local backend (localhost:8000)
npm run local
# Staging backend (busgen.greensphere.one)
npm run staging
# Production backend (app.bluesphere.ai)
npm run productionServer runs at http://localhost:3000 (accessible on network via machine IP)
| Script | Description |
|---|---|
npm start |
Start dev server (port 4100, localhost backend) |
npm run build |
Create production build |
npm run local |
Build + serve with local backend |
npm run staging |
Build + serve with staging backend |
npm run production |
Build + serve with production backend |
npm test |
Run tests |
Strict Mode is enabled in development (app/src/main.tsx). This causes components to render twice intentionally to help detect side effects and deprecated APIs.
Note: If you see duplicate API calls in development, this is expected behavior. Strict Mode double-renders only happen in development, not in production builds.
To temporarily disable (not recommended):
// In app/src/main.tsx, change:
<StrictMode>
<App />
</StrictMode>
// To:
<App />