chore: initial trade-visualizer import
This commit is contained in:
33
README.md
Normal file
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# trade-visualizer
|
||||
|
||||
Standalone local frontend (Vite + React) for the `trade` stack.
|
||||
|
||||
## Dev (proxy to VPS)
|
||||
|
||||
Default target is `https://trade.mpabi.pl`.
|
||||
|
||||
```bash
|
||||
npm ci
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Optional env:
|
||||
|
||||
- `API_PROXY_TARGET` (default: `https://trade.mpabi.pl`)
|
||||
- `GRAPHQL_PROXY_TARGET` (default: same as `API_PROXY_TARGET`)
|
||||
- `VITE_API_URL` (default: `/api`)
|
||||
- `VITE_HASURA_URL` (default: `/graphql`)
|
||||
|
||||
The dev server proxies:
|
||||
|
||||
- `/api/*` to the upstream API
|
||||
- `/graphql` + `/graphql-ws` to upstream Hasura (supports WS subscriptions)
|
||||
- `/auth/*`, `/whoami`, `/logout` to upstream UI (session auth + cookie rewrite for localhost)
|
||||
|
||||
## 100% local
|
||||
|
||||
Point proxy to your local `trade-frontend` container:
|
||||
|
||||
```bash
|
||||
API_PROXY_TARGET=http://localhost:8081 GRAPHQL_PROXY_TARGET=http://localhost:8081 npm run dev
|
||||
```
|
||||
Reference in New Issue
Block a user