Capítulo 462 de 988

Chapter 462: expressWebhook()

Core Idea

Simplifies the process of setting up a Lambda Webhook in your Express. js server.

Key Concepts

  • API
  • secret
  • testing
  • extraHeaders
  • onSuccess()
  • onError()
  • onTimeout()
  • Example

Code Examples

const handler = expressWebhook({
  secret: 'mysecret',
  testing: true,
  extraHeaders: {
    region: "south-asia"
  },
  onSuccess: () => console.log('Rendering Completed Successfully'),
  onError: () => console.log('Something went wrong while rendering'),
  onTimeout: () => console.log('Timeout occurred while rendering'),
})

router.post("/webhook", jsonParser, handler);

router.options("/webhook", jsonParser, handler);
  • What it demonstrates: Usage pattern for expressWebhook() from the official docs.

Key Takeaways

  1. Understand api when working with expressWebhook().
  2. Understand secret when working with expressWebhook().
  3. Understand testing when working with expressWebhook().
  4. Understand extraheaders when working with expressWebhook().
  5. Understand onsuccess() when working with expressWebhook().

Connects To

  • api: related page in the Lambda (@remotion/lambda) section.
  • Approuterwebhook: related page in the Lambda (@remotion/lambda) section.
  • Authentication: related page in the Lambda (@remotion/lambda) section.