var N1qlQuery = require('couchbase').N1qlQuery;
var couchbase = require("couchbase");
var cluster = new couchbase.Cluster('host');
var bucket = cluster.openBucket('default');
bucket.enableN1ql('host');
var query = N1qlQuery.fromString('SELECT * from default');
bucket.query(query, function(err, res){
if (err) {
console.log('query failed', err);
return;
}
console.log('success!', res);
});
无法查询。将错误视为
连接ECONNREFUSED 代码:" ECONNREFUSED' 系统调用:'连接'