This library, currently at version 1.3.16, provides a framework for building Slack applications optimized for edge runtimes like Cloudflare Workers, Vercel Edge Functions, and Supabase Edge Functions. It also supports Deno, Bun, and Node.js. `slack-edge` emphasizes TypeScript support, offering enhanced type safety for Slack events and API interactions. It differentiates itself from Slack's Bolt framework by being specifically designed for edge environments, including out-of-the-box support for "lazy listeners" for asynchronous processing, similar to Bolt-Python. The project maintains a frequent release cadence, primarily focusing on bug fixes, dependency upgrades, and support for new Slack API event types. A key aspect is its minimal dependency footprint, relying primarily on `slack-web-api-client` for Slack API interactions. This design choice contributes to faster cold starts and lower resource consumption, making it ideal for serverless and edge computing architectures.
npm install slack-edgeVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic Slack app on Cloudflare Workers, handling a slash command. It uses `slack-edge`'s core `SlackApp` and integrates with `slack-cloudflare-workers` to manage the edge function request/response lifecycle, showcasing both synchronous acknowledgment and asynchronous lazy listeners.
Offload all long-running tasks to 'lazy listeners' (the optional third argument in event handlers). These execute asynchronously, allowing the initial request to be acknowledged promptly.
Install the appropriate adapter package for your chosen runtime environment and follow its documentation for proper integration, as shown in the quickstart for Cloudflare Workers.
Ensure `oidc.start` is used for OpenID Connect (OIDC) endpoint customization. Upgrade to version 1.3.8 or later to resolve this bug.
Always verify that all required Slack app environment variables are correctly set in your deployment environment and, for local development, in a `.dev.vars` file or equivalent.