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.
const receiver = new ExpressReceiver({ signingSecret: AppConfig.signingSecret });
app.use(eventLogger) // my own custom middleware
// but this doesnt work
// app.use('/cdn', express.static('/cdn'))
currently I have to wire it up with manual send file:
receiver.router.get('/cdn/*', (req, res) => {
logger.log('cnd get', req.path)
const fp = path.join(__dirname, '../../../', req.path)
res.contentType('image/jpeg');
res.sendFile(fp);
})
What type of issue is this? (place an x in one of the [ ])
Requirements (place an x in each of the [ ])
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.staticmiddleware.currently I have to wire it up with manual send file:
What type of issue is this? (place an
xin one of the[ ])Requirements (place an
xin each of the[ ])