@@ -10,7 +10,7 @@ project is to provide modules for:
10103 . Dispatching event payloads to individual functions by callback ID and running
1111 them (` src/dispatch-payload.ts ` )
1212
13- This library has four modes of operation:
13+ This library has multiple modes of operation:
1414
15151 . Using ` mod.ts ` as the entrypoint, a directory containing function code files
1616 to be loaded at runtime must be provided as an argument. This directory must
@@ -22,22 +22,19 @@ This library has four modes of operation:
2222 contain a ` manifest.json ` , ` manifest.ts ` or ` manifest.js ` file, which in turn
2323 must contain function definitions that include a ` source_file ` property. This
2424 property is used to determine which function to load and run at runtime.
25- 3 . Using ` self-hosted-socket-mode.ts ` as the entrypoint. This establishes a persistent
26- WebSocket connection to Slack using Socket Mode and maintains a long-running process that listens for events.
27- 4 . Using ` self-hosted-http-mode.ts ` as the entrypoint. This starts an HTTP server that
28- accepts events via POST requests to ` /events ` endpoints, similar to Bolt JS's
29- HTTPReceiver. The only required environment variable is
30- ` SLACK_SIGNING_SECRET ` ; optional variables include ` PORT ` ,
31- ` SLACK_SIGNATURE_VERIFICATION ` , and ` SLACK_API_URL ` (e.g.
32- ` SLACK_SIGNING_SECRET=xxx PORT=3000 deno run src/self-hosted-http-mode.ts ` ).
25+ 3 . Using ` self-hosted-socket-mode.ts ` as the entrypoint. This establishes a
26+ persistent WebSocket connection to Slack using Socket Mode and maintains a
27+ long-running process that listens for ` function_executed ` events. It expects
28+ a similar setup in the current working directory as the ` local-run.ts `
29+ entrypoint.
3330
3431Regardless of which mode of operation used, each runtime definition for a
3532function is specified in its own file and must be the default export.
3633
3734## Usage
3835
39- By default, your Slack app has a ` .slack/hooks.json ` file that defines a ` get-hooks `
40- hook. The Slack CLI will automatically use the version of the
36+ By default, your Slack app has a ` .slack/hooks.json ` file that defines a
37+ ` get-hooks ` hook. The Slack CLI will automatically use the version of the
4138` deno-slack-runtime ` that is specified by the version of the ` get-hooks ` script
4239that you're using. To use this library via the Slack CLI out of the box, use the
4340` slack run ` command in your terminal. This will automatically run the ` start `
@@ -70,8 +67,6 @@ operating this library in:
7067 ` deno run -q --config=deno.jsonc --allow-read --allow-net https://deno.land/x/deno_slack_runtime@0.1.1/local-run.ts `
71683 . Self-hosted socket mode:
7269 ` deno run -q --config=deno.jsonc --allow-read --allow-net --allow-run --allow-env --allow-sys=osRelease https://deno.land/x/deno_slack_runtime@0.1.1/self-hosted-socket-mode.ts `
73- 4 . Self-hosted HTTP Receiver:
74- ` deno run -q --config=deno.jsonc --allow-read --allow-net --allow-env --allow-sys=osRelease https://deno.land/x/deno_slack_runtime@0.1.1/self-hosted-http-mode.ts `
7570
7671⚠️ Don't forget to update the version specifier in the URL inside the above
7772commands to match the version you want to test! You can also drop the ` @ ` and
0 commit comments