2

我现在使用快递很长时间了。对于下一个项目,我需要使用 flatiron.js。

作为第二个依赖项,我使用 bower 进行 JavaScript 库处理。现在我想将我的 public/ 目录和 bower components/ 目录提供给前端。

我尝试了一些静态文件服务库,但它们都只服务于第一个设置目录。我习惯于像这样表达设置多个中间件:

app.use(express.static(__dirname + '/public'));
app.use('/components', express.static(__dirname + '/components'));

我有机会在熨斗中运行它吗?

4

0 回答 0