item-atlas/apps/pc/README.md

26 lines
1.0 KiB
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.

# 见物桌面工作台
Vue 3、TypeScript、Vue Router 和 Vite。网页使用同源 `/api` 接现有网关,账号、物品和布局与 iOS 共享。
## 本地运行
使用 Node.js 24。在仓库根目录执行:
```sh
npm --prefix apps/pc ci
npm --prefix apps/pc run dev -- --port 4173
```
打开 `http://127.0.0.1:4173`。开发代理默认使用公网预览 API,可用 `ATLAS_GATEWAY_URL` 切换到其他网关。登录令牌只在当前页面内存中使用,刷新页面后重新登录。
## 构建与部署
```sh
npm --prefix apps/pc run build
docker build -t item-atlas-pc:0.1.0 apps/pc
```
镜像监听 8080。容器内 `ATLAS_GATEWAY_URL` 指向可达的网关;同一 Kubernetes 命名空间默认用 `http://item-atlas-gateway:8080`。就绪检查用 `/healthz`,Nginx 负责 SPA 路由和同源 API 转发。外部站点通过 HTTPS 接入。Drone 在现有流水线运行 `build-pc` 构建检查。
[产品交互](../../docs/ui/pc-workbench.md) · [域名与部署](../../docs/deployment/overview.md)