Probot&Express-从特定路径提供静态文件

时间:2019-06-26 03:40:55

标签: express probot

使用以下路由,我无法在/src/templates/images目录中提供该静态文件(图像)。

const routerImages = app.route('/assets/ti');
routerImages.use(require('express').static(__dirname + '/src/templates/images'));

请注意,在这种情况下,app是指probot(GitHub Apps框架)应用程序对象。

我已经看到了类似的问题,但是不知何故,我无法运行它。

在localhost(本地开发环境)上有效。因此,我很确定问题出在静态目录引用(__dirname ...)中。

0 个答案:

没有答案