Webhook development
Webhook providers need a public HTTPS URL to deliver to. routeup gives your local service one, so you can develop against real deliveries instead of mocking them.
1. Expose your local API
Section titled “1. Expose your local API”Run your API (say on port 8080) and expose it:
routeup serve example-app --port 8080 --exposeThe examples below assume your saved token allows
*.mukul.routeup.dev.
routeup prints the local URL, public URL, exposure scope, and targets:
route: example-applocal: https://example-app.localhostpublic: https://example-app.mukul.routeup.devexpose: all pathstargets: / http://localhost:8080
press Ctrl-C to stop2. Point the provider at it
Section titled “2. Point the provider at it”Register the public URL as the webhook endpoint in the provider’s dashboard:
GitHub: Settings → Webhooks → Payload URLStripe: Developers → Webhooks → Add endpointSlack: Your App → Event Subscriptions → Request URLUse the full path your handler listens on, e.g.
https://example-app.mukul.routeup.dev/api/webhooks/github.
3. Watch deliveries
Section titled “3. Watch deliveries”Tail public traffic as it arrives:
routeup logs example-app --public --follow12:41:03 public example-app POST /api/webhooks/github 200 38ms req_Ap7kQ3mN8vR2xLzCBecause the route and namespace are configured, you request the same endpoint on each run instead of accepting a newly generated URL. Public claims remain subject to the server’s normal conflict rules.
4. Inspect a specific delivery
Section titled “4. Inspect a specific delivery”routeup logs shows metadata only. To see the full payload and response for a
delivery, enable capture in routeup.json:
{ "name": "example-app", "port": 8080, "capture": { "request": true, "response": true, "redact_headers": ["x-hub-signature-256", "authorization"] }}Then grab the request id from the log line and inspect it:
routeup inspect req_Ap7kQ3mN8vR2xLzCRequest-------Capture: completeBody bytes: 842X-Github-Event: push
Body----{"ref":"refs/heads/main","repository":{"full_name":"acme/api"},...}
Response--------Capture: completeBody bytes: 4
Body----{"ok":true}Scoping exposure
Section titled “Scoping exposure”If you only want the webhook path reachable and the rest of the app private, you
can limit public exposure to a path prefix (for example /api/webhooks/*) so the
rest of the service stays local-only:
{ "name": "example-app", "port": 8080, "expose": { "paths": ["/api/webhooks/*"] }}