1. 安装:

If you are on a Debian flavor of Linux (Ubuntu, Mint, etc.), you can install CouchDB with:

$ sudo apt-get install couchdb
On a Mac you can do: $ brew install couchdb
On Windows, you should install from the CouchDB web site.

 

A CouchDB alternative: PouchDB Server

If you have trouble installing CouchDB, you can also install PouchDB Server, which is a drop-in replacement for CouchDB that uses PouchDB under the hood:

$ npm install -g pouchdb-server
$ pouchdb-server --port 5984
PouchDB Server is currently experimental, and we do not recommend it for production environments.

  

2. 启用跨域访问:

CORS is a web technology that allows web sites to use resources from another domain. You will want to enable this in your CouchDB before continuing, because otherwise PouchDB will not work unless it's served from exactly the same domain as CouchDB.

Enabling CORS is easy. Just install this handy script:

$ npm install -g add-cors-to-couchdb
And run it: $ add-cors-to-couchdb
If you installed PouchDB Server, CORS is enabled by default, and this step is not necessary.

  

3. 客户端使用:

<script src="bower_components/pouchdb/dist/pouchdb.min.js"></script>

  

pouchdb 安装使用的更多相关文章

  1. ionic 通过PouchDB + SQLite来实现app的本地存储(Local Storage)

    首先声明,本教程参考国外网站(http://gonehybrid.com/how-to-use-pouchdb-sqlite-for-local-storage-in-your-ionic-app/) ...

  2. ionic 运用pouchdb/sqlite 数据库做本地存储

    配置数据库环境需要3步: 1.安装slqite插件 在ionic 工程目录对应终端执行一下命令: npm install cordova-plugin-sqlite 2.安装pouchdb 在ioni ...

  3. [转]ionic 通过PouchDB + SQLite来实现app的本地存储(Local Storage)

    本文转自:http://www.cnblogs.com/ailen226/p/ionic.html 首先声明,本教程参考国外网站(http://gonehybrid.com/how-to-use-po ...

  4. PouchDB 基础

    GUIDES http://pouchdb.com/guides/ 1.建立couchDB环境 下载并安装CouchDB: https://couchdb.apache.org/#download 测 ...

  5. docker——容器安装tomcat

    写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...

  6. 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法

    如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...

  7. Sublime Text3安装JsHint

    介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...

  8. Fabio 安装和简单使用

    Fabio(Go 语言):https://github.com/eBay/fabio Fabio 是一个快速.现代.zero-conf 负载均衡 HTTP(S) 路由器,用于部署 Consul 管理的 ...

  9. gentoo 安装

    加载完光驱后 1进行ping命令查看网络是否通畅 2设置硬盘的标识为GPT(主要用于64位且启动模式为UEFI,还有一个是MBR,主要用于32位且启动模式为bois) parted -a optima ...

随机推荐

  1. php大力力 [003节]php在百度文库的几个基础教程mac环境下文本编辑工具

    2015-08-22 php大力力003.mac环境下文本编辑工具 在windows下,使用notepad特别多.在mac下使用“备忘录”app,word,反而没有存储过txt后缀等不同文本. mac ...

  2. css3制作六边形图片

    效果图: 实现原理: 这个效果的主要css样式有: 1.>transform: rotate(120deg); 图片旋转 2.>overflow:hidden;  超出隐藏 3.>v ...

  3. android中KSOAP2中的anytype{}问题

    如果web返回为空,即空字符串的时候,KSOAP2会返回一个anytype{}这样的一个串回来,要比对下是不是这个串,如果是就返回null,从而避免查不到数据时没有相应处理. if (jsonStr. ...

  4. Android pix转换为sp

    /** * 把pix值转换为sp * * @return */ public static float px2sp(Context context, float pixValue) { final f ...

  5. Android Material Design : Ripple Effect水波波纹荡漾的视觉交互设计

     Android Material Design : Ripple Effect水波波纹荡漾的视觉交互设计 Android Ripple Effect波纹荡漾效果,是Android Materia ...

  6. 针对无线信道衰落特性分析3G,4G,5G的关键技术异同点

    1 无线信道特性对3G系统的影响 2

  7. Nagios:企业级系统监控方案

    在大多数情况下Cacti + RRDtool已经实现对系统各种参数的监测.但很多企业可能不满足于仅仅监测系统基本参数的需求,而是需要监测除基本参数之外的各种应用程序的运行状况.很显然在这种情况下对于一 ...

  8. AC自动机 专题

    // 求目标串中出现了几个模式串 //==================== #include <stdio.h> #include <algorithm> #include ...

  9. poj 1190 生日蛋糕

    中文题 题目分析 搜索题,非常好的剪枝 由于深度一定(m),所以使用深度优先搜索,自上而下的设定蛋糕序号,最顶层的为第1层,……,最底层的蛋糕为第m层,很明显满足题目条件的前i层的(从顶层(也就是编号 ...

  10. C++ list<list<int> >类型的对象遍历

    void listSort(list<list<int> >* initList) { list<list<int> >::iterator itera ...