Veri Wallet UI – Build & Run Guide
Prerequisites
- Node.js 18+ (Node 20.19+ recommended by Vite)
- npm 9+
Install dependencies
cd ui-veri-wallet
npm install
Run the dev server
npm run dev
# Default: http://localhost:5173
Production build & preview
npm run build # generates dist/
npm run preview # serve the built files locally
Configure backend API URL
The UI reads the backend base URL from environment variables (in priority order):
VITE_API_BASE_URL(recommended for Vite)REACT_APP_API_BASE_URL(fallback for compatibility)
Examples:
# Unix/macOS
VITE_API_BASE_URL="http://localhost:3000" npm run dev
# Windows (PowerShell)
$env:VITE_API_BASE_URL="http://localhost:3000"; npm run dev
Configure frontend dev server port
The dev server port is set in vite.config.ts (currently 5173).
update server.port in vite.config.ts:
export default defineConfig({
plugins: [react()],
server: { port: 5173 }, // change this value
});