@idealite/web-services
Version:
Comprehensive web services library with webhook system and Mux integration
44 lines • 1.29 kB
TypeScript
/**
* Example Express application demonstrating Mux webhook integration
*/
declare const app: import("express-serve-static-core").Express;
declare function setupAllWebhooks(): void;
export { app, setupAllWebhooks };
/**
* Usage Examples:
*
* 1. Environment Variables:
* export MUX_WEBHOOK_SECRET="your_webhook_secret_from_mux"
* export NODE_ENV="development"
* export PORT="3000"
*
* 2. Running the server:
* npm start
* # or
* ts-node examples/mux-webhook-server.ts
*
* 3. Testing webhooks:
* curl -X POST http://localhost:3000/webhooks/mux/dev \
* -H "Content-Type: application/json" \
* -d '{
* "type": "video.asset.ready",
* "id": "webhook-test",
* "created_at": "2024-01-01T00:00:00Z",
* "data": {
* "id": "asset-123",
* "status": "ready",
* "duration": 120.5
* },
* "environment": {
* "name": "development",
* "id": "env-123"
* }
* }'
*
* 4. Mux Dashboard Configuration:
* - Go to Settings > Webhooks
* - Add webhook URL: https://yourdomain.com/webhooks/mux/complete
* - Select events you want to receive
* - Copy the webhook secret to MUX_WEBHOOK_SECRET
*/
//# sourceMappingURL=mux-webhook-server.d.ts.map