Express Mongo呼叫无法正常工作

时间:2015-08-24 04:15:10

标签: node.js mongodb rest express

我尝试使用node + express以下列方式获取存储在Mongo集合中的对象:

.moreAnswersButton, .button
    {
        height: 50px;
        width: 125px;
        text-align: center;
        border-radius: 5px;
        padding: 0;
        vertical-align: bottom;
    }

但它会抛出一个错误:设置后不能设置标头。自从我在数据库检索中包含router.get('/api/articles/:page',function(req,res){ var x = {} Article.find({},function(err,arts){ res.json(arts); }).limit(10).skip(page*10).sort({timestamp:-1}); }); 函数以来,这个错误就开始发生了。

1 个答案:

答案 0 :(得分:0)

While (CurrD <= endp)
    Task.Factory.StartNew(Sub()
            Call PostTo("http://" & My.Settings.UrlServer & "/Process/SubmitRencanaLembur.aspx?sid=" & ((DateTime.UtcNow - New DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds).ToString.Trim, "POST", "&NOREG=" & Noreg.Trim & "&Nama=" & LblNama.Text.Trim & "&DirectReport=" & LblDirectReport.Text.Trim & "&Tanggal=" & Format(CurrD, "dd MMM yyyy") & "&OTPlan=03%3A00&Reason=Robot Testing")
            CurrD = CurrD.AddDays(1)
    End Sub)      
End While