GithubHelp home page GithubHelp logo

node-multicouch's Introduction

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 [email protected]

node-multicouch's People

Contributors

acconut avatar janl avatar mdlawson avatar natevw avatar shrink0r avatar svnlto avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.