我在下面有以下代码,其中我使用 Restify 创建一个 node.js 服务器并创建路由。我想连接到 CouchDB 以执行 GET、POST、DELETE、PUT 操作。
var restify = require("restify");
var server = restify.createServer();
server.listen(8080, function(){
console.log("incoming requests");
});
server.get('/users', function(req, res){
//CONNECT TO COUCHDB HERE
console.log("Got it!");
res.end();
});}
知道如何连接和检索我的数据吗?
提前致谢。
最佳答案
您可以使用 JQuery 插件连接到 CoachDB。您可以查看以下链接以获取更多详细信息 http://www.couchbase.org/community/articles/couchdb/recipes/3 http://java.dzone.com/news/couchdb-jquery-plugin
关于javascript - 使用 Javascript 连接到 couchDB(服务器端),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28587956/