Closed dcsan closed 4 years ago
// but this doesnt work // app.use('/cdn', express.static('/cdn'))
receiver.app.use('/cdn', express.static('/cdn'))
should work for you. As App
should not provide any Express.js specific methods or interfaces, we won't add the functionalities to App
. You can directly access Express by either receiver.router
or receiver.app
.
@dcsan I believe I've already answered this question. Could you close this issue?
yep this worked, thanks!
@seratch using a custom ExpressReceiver
as the receiver
property into App
is not always an option. As soon as you provide the receiver
option the built-in Bolt listeners aren't usable. I am currently using the built-in listeners and endpoints for OAuth, events and actions, so want to keep using those but at the same time also configure a static files endpoint.
How can I do that without losing all the OAuth and event listeners that come with Bolt?
Bolt for JavaScript does not support OAuth for custom receivers. If you’re implementing a custom receiver, you can use our Slack OAuth library, which is what Bolt for JavaScript uses under the hood.
Description
I want to send some static files from an app that's also using Bolt.
as per the docs here I can get the bolt "router" but can't use the normal method to attach
express.static
middleware.currently I have to wire it up with manual send file:
What type of issue is this? (place an
x
in one of the[ ]
)Requirements (place an
x
in each of the[ ]
)