1.What is CouchDB?
Apache CouchDB™ is a database that uses JSON for documents, JavaScript for MapReduce indexes, and regular HTTP for its API
2.Download
http://couchdb.apache.org/
3.Use with Browser
这里安装的是Windows版本,在开始中找到,Futon(CouchDB website interface),使用浏览器打开:
http://127.0.0.1:5984/_utils/
创建数据库,添加文档,删除,修改等操作均可以在浏览器上完成,官网上也说“A Database for the Web”(其实,用过CloudantDB的人都知道,所有操作都用浏览器可以完成,是因为使用了RESTful技术,然后就可以做成Daas,即Database as a service,说白了,就是把数据库做成云服务)
4.Configuration Bind IP Address,配置IP以供其他机器访问
在主页上右侧有个Tools,点击Configuration,然后左边就会出现httpd选项,其中有个bind_address字段,将127.0.0.1改为自己的IP地址,这样同一网段中其他机器也可以访问了。否则,就会出现“服务器拒绝连接”的问题。
5.执行 Temporary View
Map 函数为:
function(doc) {
emit(doc.name, doc);
}