Files
opsxapi/homepage/content/02-quickstart.md
T
Logan.Li 3cb9545121 refactor(homepage): 官网/文档/定价源码迁出程序 + 新增独立授权与激活页 /license
- 官网源码归拢到 homepage/(index/pricing/terms/license + content/ + assets/ + docs-assets/),
  删除程序内 go:embed 的 server/internal/{site,docs},后端仅静态托管 homepage/dist 做本地预览
- 新增独立静态页 /license(授权与激活):交付与激活四步(邮件交付授权码)、
  在线授权码 LIC- 与离线许可证 LICOFF- 对比、授权服务器 licence.rlwj.cn 通信范围说明、
  授权类型与价格、10 条授权 FAQ
- tools/homepage-build 支持可选单页,产出 <name>.html 与 <name>/index.html
- 导航/页脚接入 /license,跨页锚点补 / 前缀,页脚底栏文案同步为静态站口径
2026-10-16 04:16:16 +08:00

49 lines
1.4 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.
## 环境要求
| 组件 | 版本 | 用途 |
| --- | --- | --- |
| Node.js | ≥ 20 | Web 前端(Vite) |
| Go | ≥ 1.23 | 本地代理服务(Gin) |
| Rust + Cargo | 可选 | 仅编译桌面端(Tauri)时需要 |
## 启动
```bash
git clone <你的仓库地址> opsxapi
cd opsxapi
make install # 安装依赖(npm install,含桌面端)
./run.sh web # 启动:Gin(:8787) + Web UI(:5173)
```
看到下面的输出即可打开浏览器:
```bash
[OK] 后端 UP http://127.0.0.1:8787/health
[OK] Web UP http://127.0.0.1:5173
```
| 命令 | 说明 |
| --- | --- |
| `./run.sh web` | 浏览器版(推荐) |
| `./run.sh gui` | 桌面窗口(Tauri,共用同一 UI) |
| `./run.sh all` | Web + 桌面一起开 |
| `./run.sh status` / `stop` | 查看状态 / 停止 |
## 30 秒发出第一个请求
1. 打开 <http://127.0.0.1:5173>,左侧是内置的「示例集合」。
2. 点击 **HTTP · httpbin → 获取请求回显**。
3. 点击右上角 **发送**。
4. 下方响应区显示 `200`、耗时与 JSON 高亮响应体 —— 完成!
## 桌面端(可选)
```bash
./run.sh gui
```
桌面端复用同一份界面与数据通道,HTTP 请求走 Tauri 原生网络栈,不依赖浏览器 CORS。
> **提示**:首次打开会自动创建两个环境(正式 / 本地)和一个覆盖全部协议的示例集合,可随时在「设置」中重置。