1.0.8 • Published 1 year ago

couchdb-manager v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

CouchDB Management Tool

A Node.js package for managing CouchDB databases. This tool automates the creation of databases, adding or updating views, and indexing documents in CouchDB.

Features Database Creation: Automatically create databases in CouchDB. View Management: Add or update views within existing databases. Document Indexing: Index documents to enhance query performance.

Installation

How to use it

const couchdbManager = require("couchdb-manager");
let viewDoc = {
  _id: "_design/view",
  views: {
    all: {
      map: "function (doc) { emit(doc._id, 1);}",
    },
  },
  language: "javascript",
};

const dbs = [
  {
    user_name: "root",
    password: "root",
    service_url: "localhost", // assume db host in localhost just use localhost
    service_port: 5000,
    db_name: "test",
    view_document: viewDoc,
  },
];

const create = async () => {
try {
  var x = await couchdbManager.createDB(dbs);
    console.log("appboot db create info", x);
  } catch (error) {
    console.log(" appboot db create error", error);
  }
};

create();
1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago