Revert "Convert Cloudflare Worker to Cloudflare Pages"
This commit is contained in:
1 parent
5e9c965218
commit
3b1ee1cd2e
10 files changed
+35
-240
No files matched your search
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## Project Overview
|
||||
|
||||
Xget is a high-performance acceleration engine for developer resources built on Cloudflare Pages. It provides unified acceleration for code repositories, package managers, container registries, AI inference providers, and more. The application proxies requests to various platforms, applies intelligent caching, and implements security measures while maintaining protocol compliance (Git, Docker/OCI, AI APIs).
|
||||
Xget is a high-performance acceleration engine for developer resources built on Cloudflare Workers. It provides unified acceleration for code repositories, package managers, container registries, AI inference providers, and more. The application proxies requests to various platforms, applies intelligent caching, and implements security measures while maintaining protocol compliance (Git, Docker/OCI, AI APIs).
|
||||
|
||||
**Key Features:**
|
||||
|
||||
@@ -65,12 +65,12 @@ npm run format:check
|
||||
### Deployment
|
||||
|
||||
```bash
|
||||
# Deploy to Cloudflare Pages
|
||||
# Deploy to Cloudflare Workers
|
||||
npm run deploy
|
||||
# or
|
||||
wrangler pages deploy
|
||||
wrangler deploy
|
||||
|
||||
# Start local development server
|
||||
# Start production preview
|
||||
npm start
|
||||
```
|
||||
|
||||
@@ -115,19 +115,6 @@ podman run -p 8080:8080 xget
|
||||
- Container registries: `cr-docker`, `cr-ghcr`, `cr-gcr`, etc. (prefix: `cr-`)
|
||||
- `transformPath()` - Converts prefixed URLs to actual platform URLs
|
||||
|
||||
**`functions/[[path]].js`** - Cloudflare Pages Function handler
|
||||
|
||||
- `onRequest()` - Pages Function entry point that wraps handleRequest
|
||||
- Catch-all route handler that processes all incoming requests
|
||||
- Converts Pages Function context to Workers-compatible format
|
||||
- Delegates to handleRequest for actual processing
|
||||
|
||||
**`public/index.html`** - Landing page
|
||||
|
||||
- Static HTML page served at the root URL
|
||||
- Provides information about Xget features and usage examples
|
||||
- Only served when accessing the root path directly
|
||||
|
||||
### Request Flow
|
||||
|
||||
```
|
||||
@@ -199,7 +186,7 @@ podman run -p 8080:8080 xget
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Configure via Cloudflare Pages environment variables or `.dev.vars`:
|
||||
Configure via Cloudflare Workers environment or `.dev.vars`:
|
||||
|
||||
- `TIMEOUT_SECONDS` - Request timeout (default: 30)
|
||||
- `MAX_RETRIES` - Max retry attempts (default: 3)
|
||||
@@ -254,9 +241,9 @@ Configure via Cloudflare Pages environment variables or `.dev.vars`:
|
||||
|
||||
## Deployment Targets
|
||||
|
||||
1. **Cloudflare Pages** (primary): Zero-config deployment with global edge network and built-in static asset hosting
|
||||
1. **Cloudflare Workers** (primary): Zero-config deployment with global edge network
|
||||
2. **Docker/Podman**: Self-hosted with workerd runtime (see Dockerfile)
|
||||
3. **Local development**: Wrangler Pages dev server on localhost
|
||||
3. **Local development**: Wrangler dev server on localhost
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in new issue
Block a user