node-gallery不再起作用

时间:2017-08-30 22:11:11

标签: node.js express npm

我正在尝试使用node-gallery模块。

当我使用代码时

  app.use('/gallery', require('node-gallery')({
  staticFiles : 'resources/photos',
  urlRoot : 'gallery', 
  title : 'Example Gallery'
}));

它运行正常,但是当我尝试使用

编写自己的函数时
  app.use('/gallery', require('node-gallery')({
  staticFiles : 'resources/photos',
  urlRoot : 'gallery', 
  title : 'Example Gallery',
  render : false
}), function(req, res, next){

  //my func, for example:
  console.log("test");
  //return res.send(req.html);
});

它不起作用,功能只是没有执行... 文档: https://www.npmjs.com/package/node-gallery 请帮我。 谢谢。

0 个答案:

没有答案
相关问题