Skip to content

Commit 33edf95

Browse files
committed
docs: add README with endpoint docs and development guide
1 parent ace79d0 commit 33edf95

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# vp-setup-exe-downloader
2+
3+
Download redirector for the Vite+ Windows installer. Auto-detects CPU architecture and redirects to the correct GitHub release asset.
4+
5+
## Endpoints
6+
7+
### `GET /`
8+
9+
Redirects to the [Vite+ installation guide](https://viteplus.dev/guide/#install-vp).
10+
11+
### `GET /download`
12+
13+
Redirects to the latest `vp-setup.exe` GitHub release asset.
14+
15+
**Query parameters:**
16+
17+
| Param | Description | Example |
18+
| ------ | ------------------------------------------------ | ---------------------- |
19+
| `arch` | Override architecture detection (`x64`, `arm64`) | `?arch=arm64` |
20+
| `tag` | Pin to a specific release tag | `?tag=v0.1.17-alpha.0` |
21+
22+
**Architecture detection:**
23+
24+
1. `?arch=` query parameter (explicit override)
25+
2. `User-Agent` header (detects `ARM64`/`aarch64`)
26+
3. Defaults to `x64`
27+
28+
## Development
29+
30+
```bash
31+
vp install
32+
vp dev # start dev server
33+
vp check # format, lint, type check
34+
vp test # run tests
35+
```
36+
37+
## Deployment
38+
39+
Deployed to [Cloudflare Workers](https://workers.cloudflare.com/) via [Void](https://void.cloud). Pushes to `main` trigger automatic deployment.
40+
41+
### Environment variables
42+
43+
| Variable | Required | Description |
44+
| -------------- | -------- | ---------------------------------------------------------- |
45+
| `GITHUB_TOKEN` | No | GitHub token for higher API rate limits (60/hr -> 5000/hr) |
46+
| `VOID_TOKEN` | Yes (CI) | Void deployment token |

0 commit comments

Comments
 (0)