Skip to content

Commit 4f83925

Browse files
committed
docs(notify-url-relay): explain relay flow vs tunnel
1 parent 5b352b3 commit 4f83925

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

packages/notify-url-relay/README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,26 @@
22

33
Local `notify_url` relay for Transloadit Assemblies. This tool polls the status of Assemblies until they complete, then pushes the status to a pingback URL of your choosing. This is useful while on a development machine, which is inaccessible from the public internet and hence can't be notified by Transloadit.
44

5-
You can alternatively use a tunnel like ngrok or [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/) for this, this is just one more way.
5+
For local development, you can choose one of:
6+
7+
- [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/)
8+
- [ngrok](https://ngrok.com/)
9+
- [@transloadit/notify-url-relay](https://www.npmjs.com/package/@transloadit/notify-url-relay)
10+
11+
Tunnels expose an inbound public URL to your machine. The relay works differently: it runs locally,
12+
polls Assembly Status from Transloadit, and forwards terminal notifications to your local `notifyUrl`
13+
handler.
14+
15+
## How It Works
16+
17+
1. Start the relay locally (for example on `http://127.0.0.1:8888`).
18+
2. Configure your app in development to use the relay as its Transloadit endpoint.
19+
3. Your app creates Assemblies through the relay; the relay forwards those requests to Transloadit.
20+
4. The relay extracts each returned `assembly_url`, polls it until terminal state, and POSTs the
21+
final payload to your local `notifyUrl`.
22+
23+
Your app still uses its regular Transloadit credentials to create Assemblies; the relay needs
24+
`TRANSLOADIT_SECRET` to sign forwarded notifications.
625

726
This version is modernized for:
827

@@ -25,6 +44,7 @@ npm install @transloadit/notify-url-relay
2544
## Run Without Install
2645

2746
```bash
47+
# In development, point your app's Transloadit endpoint to http://127.0.0.1:8888
2848
TRANSLOADIT_SECRET="your-secret" \
2949
npx -y @transloadit/notify-url-relay \
3050
--notifyUrl "http://127.0.0.1:3000/transloadit" \

0 commit comments

Comments
 (0)