0
我花了好几个小时才弄明白为什么我不能使用Mango Query功能。在福克斯顿,我既不能添加芒果索引,也不能运行芒果查询。例如,在NodeJS中:无法创建索引,即/ {db}/_ index在2.0.0上不起作用
var PouchDB = require('pouchdb');
PouchDB.plugin(require('pouchdb-find'));
var db = new PouchDB('http://localhost:5986/books');
db.createIndex({ index: { fields: ['nom'] } })
.then(console.log)
.catch(console.log);
=> { error: 'bad_request',
reason: 'Referer header required.',
name: 'bad_request',
status: 400,
message: 'Referer header required.' }
任何线索欢迎!谢谢
我举了一个使用NodeJS和PouchDB的例子,但实际上问题出在CouchDB 2.0服务器上,因为我无法在Fauxton或curl shell命令中创建Mango索引。 CouchDB的配置或编译有一些设置吗?我为OSX下载了“Apache CouchDB.app”。我应该从源代码安装CouchDB并编译它吗?任何线索? –