【发布时间】:2019-08-21 05:20:46
【问题描述】:
我在我的 express 应用中使用 this (contentful-export) 库,就像这样
const app = require('express');
...
app.get('/export', (req, rex, next) => {
const contentfulExport = require('contentful-export');
const options = {
...
}
contentfulExport(options).then((result) => {
res.send(result);
});
})
现在这确实有效,但是该方法需要一些时间并将状态/进度消息发送到节点控制台,但我也想让用户保持更新.. 有没有办法可以发送节点控制台进度给客户的消息??
这是我第一次使用 node / express 任何帮助将不胜感激,我不确定这是否已经有了答案,因为我不完全确定该怎么称呼它?
【问题讨论】: