嗨,我在我的机器上运行了这个例子,它说markoExpress()
不是一个函数。有任何想法吗 ?这是来自https://markojs.com/docs/express/的示例
require("@marko/compiler/register"); // Allow Node.js to require and load `.marko` files
var express = require("express");
var markoExpress = require("@marko/express");
var template = require("./template");
var app = express();
app.use(markoExpress()); //enable res.marko(template, data)
app.get("/", function (req, res) {
res.marko(template, {
name: "Frank",
count: 30,
colors: ["red", "green", "blue"]
});
});
app.listen(8080);