I am writing a rest application to use on top of couchbase4
i am trying to use n1ql but even running the example i am getting a not good error that seems to kill the application
in my console i see the node.js app spit out: testn1ql id:0 exited with code SIGSEGV
Here is the code, its basically taken from one of the n1ql samples:
var couchbase = require(‘couchbase’);
var myCluster = new couchbase.Cluster(‘couchbase://192.168.33.105’);
var N1qlQuery = require(‘couchbase’).N1qlQuery;
var myBucket = myCluster.openBucket();
myBucket.enableN1ql([‘http://192.168.33.105:8093/’]);
var query = N1qlQuery.fromString(‘SELECT * FROM default’);
myBucket.query(query, function(err, res) {
if (err) {
console.log(“query failed”, err);
return;
}
console.log(“success!”, res);
});
And your blog post is very helpful! i wish i found that before
Sorry if this is an additional unrelated question: Is there a good blog post or document that describes setting up couchbase in a development environment? I am running it on a VirtualBox ubuntu 14, but it is not always very happy
If you’re just using a single node, I personally just install it on my local machine because Couchbase is very lightweight. If you’re looking for non-local or multi-node solutions, there are AWS images available for quick deployment.