【发布时间】:2011-07-30 13:58:39
【问题描述】:
在 Node 中,使用 Express 和 Cradle,我调用了一个不起作用的 _list。其他呼叫转到 _view 并正常工作。 Cradle documentation 不包括关于 _list 的部分,但从 this GitHub readme 看来,它应该像 _view 一样工作。
我的代码如下:
if(isList){
db.list(couch_url, function (err, res) {
if(err){
console.log("error couchdb list", err);
}else{
//console.log(res);
callback(JSON.stringify(res));
}
});
}
couch_url 变量只是常规的 http 请求,看起来像:myCouch/_design/Model3D/_list/convert/All,除了路径指示符(_design、_view、_list)已被删除以获取 Cradle 的 Model3D/convert/All(看起来它们被放回了在摇篮功能中)。 couch_url 表示的完整路径将在其他 CouchDB 连接中工作,就像我说的,Cradle 视图功能工作正常。
我得到的错误对象是:
{ stack: [Getter/Setter],
arguments: [ 'ILLEGAL' ],
type: 'unexpected_token',
message: [Getter/Setter] }
【问题讨论】: