Skip to content

Q: How to use bolt-js with Cloudflare Workers or Netlify functions? #876

@ClydeDz

Description

@ClydeDz

Description

Hi,

I'm learning and experimenting with Slack API using Bolt JS and I'm really liking the experience so far. I was trying to integrate bolt.js with Netlify functions and Cloudflare Workers but it doesn't seem to work well. I believe it is to do with implementing the receiver to intercept

The Cloudflare Workers examples page shows various code snippets all with the following code as the entry point.

addEventListener("fetch", event => {
}

The Netlify functions examples page shows various code snippets all with the following code as the entry point, very similar to the Cloudflare Workers example.

exports.handler = function(event, context, callback) {
}

I was trying to implement bits from this example but it perhaps conflicts with the Netlify and Cloudflare lifecycle.

Is there a way to attach bolt's /slack/events listener another way or somehow pass the payload received from the above code snippets into a function to 'parse' and then continue using bolt's app listener events (convenience methods)?

Thanks!


What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionM-T: User needs support to use the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions