0
您好我想使用服务索引呈现模板从自定义函数,但如果我将函数传递给“模板:”我得到错误“字符串要求”。我可以做什么?如何使用服务索引与功能,而不是模板
var app = require("express");
var serveIndex = require("serve-index");
app.use('/ftp', serveIndex('public/ftp', {
'icons': true,
'template': function(){}// and this is my problem, what i shuld write this?
}))
app().listen(3000)
请编辑您的问题以包含您尝试使用的功能。感谢您提高问题的参考价值并使其更具责任感! –
我想从自定义函数渲染模板,但我不知道如何? –