feat: app功能基本实现
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
# Frontend
|
||||
|
||||
This workspace contains:
|
||||
|
||||
- `web`: Vite + Vue 3 admin frontend.
|
||||
- `app`: Taro + Vue 3 app frontend.
|
||||
|
||||
## Environment Files
|
||||
|
||||
Frontend environment variables are maintained in each app directory.
|
||||
|
||||
### Web
|
||||
|
||||
Web env files live in `frontend/web`:
|
||||
|
||||
- `.env`: default Vite values.
|
||||
- `.env.development`: local development values.
|
||||
- `.env.production`: production build values.
|
||||
- `.env.staging`: staging build values.
|
||||
|
||||
Common variables:
|
||||
|
||||
```env
|
||||
VITE_PORT=8848
|
||||
VITE_PUBLIC_PATH=./
|
||||
VITE_ROUTER_HISTORY="hash"
|
||||
VITE_CDN=false
|
||||
VITE_COMPRESSION="none"
|
||||
VITE_APP_BASE_API=/dev-api
|
||||
```
|
||||
|
||||
For Docker Compose production deployment, `frontend/web/.env.production` uses
|
||||
`VITE_APP_BASE_API=/prod-api`. The web container's Nginx config proxies
|
||||
`/prod-api` to the backend container.
|
||||
|
||||
### App
|
||||
|
||||
App env files live in `frontend/app`:
|
||||
|
||||
- `.env.development`: local development values.
|
||||
- `.env.production`: production build values.
|
||||
- `.env.test`: test build values.
|
||||
|
||||
Common variables:
|
||||
|
||||
```env
|
||||
TARO_APP_ID=
|
||||
TARO_APP_API_BASE=
|
||||
```
|
||||
|
||||
When `TARO_APP_API_BASE` is empty, the app HTTP client falls back to
|
||||
`http://localhost:8080`.
|
||||
Reference in New Issue
Block a user