<commit_before># express-pouchdb

[![Build Status](https://travis-ci.org/pouchdb/express-pouchdb.svg)](https://travis-ci.org/pouchdb/express-pouchdb)

> An Express submodule with a CouchDB style REST interface to PouchDB.

## Introduction

The **express-pouchdb** module is a fully qualified [Express](http://expressjs.com/) application with routing defined to
mimic most of the [CouchDB](http://couchdb.apache.org/) REST API, and whose behavior is handled by
[PouchDB](http://pouchdb.com/). The intention is for **express-pouchdb** to be mounted into other Express apps for
extended usability. A simple example of this is [pouchdb-server](https://github.com/nick-thompson/pouchdb-server),
which is primarily used as a quick-and-dirty drop-in replacement for CouchDB in Node.js.

## Screencasts

* [Modular web applications with Node.js and Express](http://vimeo.com/56166857)

## Installation

```bash
$ npm install express-pouchdb
```

## Example Usage

Here's a sample Express app, which we'll name `app.js`.

```javascript
var express = require('express'),
    app     = express(),
    PouchDB = require('pouchdb');

app.use('/db', require('express-pouchdb')(PouchDB));

app.listen(3000);
```

Now we can run this little guy and find each of `express-pouchdb`'s routes at the `/db` prefix.

```bash
$ node app.js &
$ curl http://localhost:3000/db/
GET / 200 56 - 7 ms
{
  "express-pouchdb": "Welcome!",
  "version": "0.2.0"
}
```
<commit_msg>(#304) - Document that pouchdb+express modules be installed<commit_after># express-pouchdb

[![Build Status](https://travis-ci.org/pouchdb/express-pouchdb.svg)](https://travis-ci.org/pouchdb/express-pouchdb)

> An Express submodule with a CouchDB style REST interface to PouchDB.

## Introduction

The **express-pouchdb** module is a fully qualified [Express](http://expressjs.com/) application with routing defined to
mimic most of the [CouchDB](http://couchdb.apache.org/) REST API, and whose behavior is handled by
[PouchDB](http://pouchdb.com/). The intention is for **express-pouchdb** to be mounted into other Express apps for
extended usability. A simple example of this is [pouchdb-server](https://github.com/nick-thompson/pouchdb-server),
which is primarily used as a quick-and-dirty drop-in replacement for CouchDB in Node.js.

## Screencasts

* [Modular web applications with Node.js and Express](http://vimeo.com/56166857)

## Installation

```bash
$ npm install express-pouchdb pouchdb express
```

## Example Usage

Here's a sample Express app, which we'll name `app.js`.

```javascript
var express = require('express'),
    app     = express(),
    PouchDB = require('pouchdb');

app.use('/db', require('express-pouchdb')(PouchDB));

app.listen(3000);
```

Now we can run this little guy and find each of `express-pouchdb`'s routes at the `/db` prefix.

```bash
$ node app.js &
$ curl http://localhost:3000/db/
GET / 200 56 - 7 ms
{
  "express-pouchdb": "Welcome!",
  "version": "0.2.0"
}
```

{'fraction_non_alphanumeric': 0.14454976303317535, 'fraction_numerical': 0.01794177386594448, 'mean_word_length': 4.422018348623853, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2385525', 'n_tokens_mistral': 1034, 'n_tokens_neox': 961, 'n_words': 296}