Skip to content
This repository was archived by the owner on Jun 23, 2026. It is now read-only.

Commit 7dcd8dd

Browse files
committed
Update READMEs for monorepo layout
1 parent 85b6e33 commit 7dcd8dd

6 files changed

Lines changed: 47 additions & 19 deletions

File tree

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
# 👷 Workers
22
Cloudflare Workers in use at Python Discord.
33

4-
READMEs in respective directories have instructions on deployment and usage.
5-
64
All workers are licensed under MIT.
75

6+
## Structure
7+
8+
This is a monorepo managed with npm workspaces. Each worker lives in its own subdirectory with its own `wrangler.toml`. Dependencies are installed from the root.
9+
10+
To deploy a specific worker:
11+
12+
```
13+
npm run deploy:<worker>
14+
```
15+
16+
## Workers
17+
18+
| Directory | Description |
19+
| --- | --- |
20+
| [error-pages](error-pages/) | Serves HTML error pages from KV |
21+
| [report-uri](report-uri/) | Proxies CSP report URI requests |
22+
| [serve-robots](serve-robots/) | Serves `robots.txt` files from KV |
23+
| [short-urls](short-urls/) | Short URL redirects on pydis.com |
24+
| [url-unfurler](url-unfurler/) | Follows redirect chains to their destination |
25+
826
## Deployment
927

10-
All workers are linted on Pull Requests and deployed to Cloudflare automatically upon merge.
28+
Workers are linted on pull requests and deployed to Cloudflare automatically on merge.

error-pages/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ This worker serves HTML error pages from Cloudflare KV based on the request path
44

55
## Deployment
66

7-
Install local dependencies with `npm install`.
7+
From the repo root, run `npm install` to install dependencies.
88

9-
Login to wrangler with `npx wrangler login`.
9+
Login with `npx wrangler login`, then deploy with:
1010

11-
After you've authorised, you can make modifications to the worker and run `npm run deploy` to deploy.
11+
```
12+
npm run deploy -w error-pages
13+
```
1214

1315
## Usage
1416

report-uri/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ This worker proxies CSP and other report URI requests over Cloudflare Workers to
44

55
## Deployment
66

7-
Install local dependencies with `npm install`.
7+
From the repo root, run `npm install` to install dependencies.
88

9-
Login to wrangler with `npx wrangler login`.
9+
Login with `npx wrangler login`, then deploy with:
1010

11-
After you've authorised, you can make modifications to the worker and run `npm run deploy` to deploy.
11+
```
12+
npm run deploy -w report-uri
13+
```
1214

1315
## Usage
1416

serve-robots/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ This worker servers `robots.txt` files at any domain proxied through Cloudflare
44

55
## Deployment
66

7-
Install local dependencies with `npm install`.
7+
From the repo root, run `npm install` to install dependencies.
88

9-
Login to wrangler with `npx wrangler login`.
9+
Login with `npx wrangler login`, then deploy with:
1010

11-
After you've authorised, you can make modifications to the worker and run `npm run deploy` to deploy.
11+
```
12+
npm run deploy -w serve-robots
13+
```
1214

1315
## Usage
1416

short-urls/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ This worker handles short URls redirection on pydis.com (for example, https://py
44

55
URLs are stored in Workers KV and can be added in the Cloudflare Dashboard or through the Wrangler CLI.
66

7-
## Publishing
7+
## Deployment
88

9-
You need to install `wrangler` with `npm install -g @cloudflare/wrangler`.
9+
From the repo root, run `npm install` to install dependencies.
1010

11-
Once you've installed this run `wrangler login`.
11+
Login with `npx wrangler login`, then deploy with:
1212

13-
After you've authorised, you can make modifications to the worker and run `wrangler publish` to push them to the edge.
13+
```
14+
npm run deploy -w short-urls
15+
```
1416

1517
### Environment Variables
1618

url-unfurler/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ This can be useful for finding out what's behind a shortened link, or any other
66

77
## Deployment
88

9-
Install dependencies with `npm install`.
9+
From the repo root, run `npm install` to install dependencies.
1010

11-
Once you've installed this run `npx wrangler login`.
11+
Login with `npx wrangler login`, then deploy with:
1212

13-
After you've authorised, you can make modifications to the worker and run `npm run deploy` to push them to the edge.
13+
```
14+
npm run deploy -w url-unfurler
15+
```
1416

1517
### Environment Variables
1618

0 commit comments

Comments
 (0)