Files
agent-radar 1a3a4ccde1
Creator App Tests / PR Spam Gate (push) Skipped
Frontend Tests / PR Spam Gate (push) Skipped
NPM Format (website & console) / PR Spam Gate (push) Skipped
Pre-commit Checks / PR Spam Gate (push) Skipped
QwenPaw Creator Plugin Release / check-version (push) Canceled after 0s
QwenPaw Creator Plugin Release / upload-oss (push) Canceled after 0s
Tests / PR Spam Gate (push) Skipped
CodeQL / CodeQL (python) (push) Canceled after 0s
CodeQL / CodeQL (typescript) (push) Canceled after 0s
Creator App Tests / Creator Backend Tests (push) Canceled after 0s
Creator App Tests / Creator UI Build & Tests (push) Canceled after 0s
E2E Smoke Tests / Playwright UI Smoke (push) Canceled after 0s
Frontend Tests / Detect console changes (push) Canceled after 0s
NPM Format (website & console) / website format check (push) Canceled after 0s
NPM Format (website & console) / console format check (push) Canceled after 0s
Pre-commit Checks / Pre-commit (push) Canceled after 0s
QwenPaw Data Plugin Release / check-version (push) Canceled after 0s
Tests / Detect code changes (push) Canceled after 0s
Frontend Tests / Vitest Unit Tests (push) Canceled after 0s
Frontend Tests / Frontend Summary (push) Canceled after 0s
QwenPaw Data Plugin Release / upload-oss (push) Canceled after 0s
Tests / Maintainer Approval (push) Canceled after 0s
Tests / Unit Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - fallback (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p2 (push) Canceled after 0s
Tests / Coverage Report (push) Canceled after 0s
Tests / Test Summary (push) Canceled after 0s
源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
2026-09-01 20:01:50 +08:00

111 lines
2.6 KiB
Markdown

# QwenPaw Website
Static site (Vite + React) for the QwenPaw product. Built output is served with a minimal Node server that supports SPA fallback (e.g. direct access to `/docs/channels`).
## Prerequisites
- Node.js 22+
- pnpm (recommended) or npm
## Install
```bash
pnpm install
# or
npm install
```
## Development
```bash
pnpm run dev
# or
npm run dev
```
Dev server runs at `http://localhost:5173` (or the next free port).
## Build
```bash
pnpm run build
# or
npm run build
```
Output is in `dist/`.
## Preview (local only)
- **Vite preview** (quick local check):
`pnpm run preview`
- **Production-style server** (same as prod, no PM2):
`pnpm run preview:prod`
Serves `dist/` at `http://localhost:8088` with SPA fallback.
## Production with PM2
Use PM2 to run the preview server in production: auto-restart on crash, logs, and easy start/stop.
### 1. Install PM2 globally (one-time)
```bash
npm install -g pm2
```
If the script runs without global PM2, it will try to install it automatically.
### 2. Build and start
```bash
cd website
pnpm run build
pm2 start ecosystem.config.cjs
```
Or from repo root (install + build + PM2 start/reload):
```bash
bash scripts/website_build.sh
```
Or use the helper script (installs PM2 if missing, then starts):
```bash
bash scripts/start.sh
```
Default port: **8088**. Override with `PORT=3000 pm2 start ecosystem.config.cjs` or by editing `ecosystem.config.cjs`.
### 3. PM2 commands
| Command | Description |
| ---------------------------------------------- | ----------------------------------------- |
| `pm2 status` | List apps and status |
| `pm2 logs qwenpaw-website` | Stream stdout/stderr logs |
| `pm2 restart qwenpaw-website` | Restart the app |
| `pm2 reload ecosystem.config.cjs --update-env` | Reload with latest config (zero-downtime) |
| `pm2 stop qwenpaw-website` | Stop the app |
| `pm2 delete qwenpaw-website` | Remove from PM2 (stop + delete) |
### 4. After code/build changes
Rebuild then reload so PM2 serves the new `dist/`:
```bash
pnpm run build
pm2 reload ecosystem.config.cjs --update-env
```
Or from repo root:
```bash
bash scripts/website_build.sh
```
## Config
- **Port**: Set in `ecosystem.config.cjs` (`env.PORT` / `args`) or env `PORT`. Default `8088`.
- **App name**: `qwenpaw-website` in `ecosystem.config.cjs` (used in `pm2 logs/restart`).