# multicouch

> Launch multiple CouchDBs from the same installation.

Latest version **0.8.2** (published 2014-05-18) · Apache 2 license · 0 weekly downloads

## Install

```sh
npm install multicouch
pnpm add multicouch
yarn add multicouch
bun add multicouch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.2 |
| Published | 2014-05-18 |
| First published | 2013-01-08 |
| Weekly downloads | 0 |
| License | Apache 2 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Jan Lehnardt |
| Maintainers | jan, caolan, svnlto |

## Links

- npm: https://www.npmjs.com/package/multicouch
- Repository: https://github.com/hoodiehq/node-multicouch
- Issues: https://github.com/hoodiehq/node-multicouch/issues
- npm.io page: https://npm.io/package/multicouch

## Dependencies (4)

- [ini](https://npm.io/package/ini.md) 1.x
- [which](https://npm.io/package/which.md) 1.x
- [shelljs](https://npm.io/package/shelljs.md) ~0.2.6
- [commander](https://npm.io/package/commander.md) 1.x

## Recent versions

- 0.8.2 (latest) — 2014-05-18
- 0.8.1 — 2014-01-21
- 0.8.0 — 2013-11-29
- 0.7.0 — 2013-07-14
- 0.6.1 — 2013-07-14
- 0.6.0 — 2013-07-14
- 0.5.0 — 2013-07-14
- 0.4.1 — 2013-06-18
- 0.4.0 — 2013-06-16
- 0.3.1 — 2013-06-15
- 0.3.0 — 2013-06-15
- 0.2.8 — 2013-04-12
- 0.2.6 — 2013-03-01
- 0.2.5 — 2013-01-22
- 0.2.4 — 2013-01-21
- … 5 more at https://npm.io/package/multicouch/versions

## README

# Multi-Couch

Launch multiple CouchDBs from the same installation, programmaticly 
or from the command line.


## What?

You can have many reasons for running more than one instance of the same CouchDB installation. Maybe you are developing multiple apps, and would like an instance per app, or you are just plain daring.

CouchDB allows you to run multiple separate instances from the same installation. So in addition to the default installation you can launch more.

To do that, you will need to adjust a few configuration variables. Namly:

 * The TCP port to bind to.
 * The database directory.
 * The view directory.
 * The log file.
 * The URI file.


## How?

To do this, we create a new CouchDB config file that includes all the values and start CouchDB with the default config files and this special one as well.


## Usage

From Node:

    var MultiCouch = require("multicouch");
    var my_couch = new MultiCouch({
      port: 8080,
      prefix: "/tmp"
      // view_dir: "/tmp", // same as db_dir when ommitted
      // log_file: "/tmp/couch.log",
      // uri_file: "/tmp/couch.uri",
      // couchdb_path: "/opt/local/bin/couchdb"
      });
    
    my_couch.start();

    my_couch.stop();

    my_couch.on("start", function() {
      console.log("CouchDB started.");
      });

    my_couch.on("stop", function() {
      console.log("CouchDB stopped.");
      });

    my_couch.on("error", function(error) {
      console.log("CouchDB errored '%s'.", error);
      });


From the CLI:

    TBD


## Configuration

Set the environment variable `COUCHDB_PATH` to the CouchDB
binary you want to use.


## License

Apache License 2.0


## Copyright

(c) 2013 Jan Lehnardt <jan@apache.org>

---
_Source: https://npm.io/package/multicouch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
