Files
mengyadriftbottle/mengyadriftbottle-frontend/README.md
2025-12-13 21:33:26 +08:00

30 lines
786 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Mengya Drift Bottle Frontend
React + Vite single-page application that consumes the Flask API exposed under `/api`.
### Available Scripts
```bash
# start dev server with API proxy to http://localhost:5002
npm run dev
# lint with ESLint
npm run lint
# production build
npm run build
```
The dev server proxies every `/api/*` request to the backend, so start the Flask app before opening the React UI.
### Configuration
Set the following environment variables in a `.env` file if you need to override defaults:
```
VITE_API_BASE_URL=http://localhost:5002/api
VITE_ADMIN_URL=http://localhost:5002/admin/login
```
In production you typically serve the static build (`dist/`) behind the same origin as the backend, allowing the default relative `/api` base to keep working.