Socket
Socket
Sign inDemoInstall

couchdb-emily-tools

Package Overview
Dependencies
18
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couchdb-emily-tools

CouchDB Tools for Emily&Olives applications


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

#CouchDB-emily-tools

A set of tools to manage and secure CouchDB from an Emily/Olives app.

Changelog is available here: https://github.com/flams/CouchDB-emily-tools/blob/master/CHANGELOG.md

###To install and use the library on the server side:

npm install emily couchdb-emily-tools
var emily = require("emily"),
	tools = require("couchdb-emily-tools");

emily.handlers.set("CouchDB", tools.handler);

tools.requirejs(["CouchDBStore", "Transport"], function (CouchDBStore, Transport) {

	var cdb = new CouchDBStore,
		transport = new Transport(emily.handlers);

	cdb.setTransport(transport);

	cdb.sync("mydatabase", "mydocument")
	.then(function () {
		console.log(cdb.toJSON());
	}, function (error) {
		console.log(error);
	});
});

###To install and use the library on the client side:

place the CouchDBTools.js file into your project alongside Olives, Require.js, and socket.io Using it on the client side requires Olives.js's socketIOTransport which will bind itself with Emily's.

<scirpt src="requirejs.js" />
<script src="/socket.io/socket.io.js" />
<script src="Emily.js" />
<script src="Olives.js" />
<script src="CouchDBTools.js" />
	requirejs(["CouchDBStore", "SocketIOTransport"], function (CouchDBStore, SocketIOTransport) {

		var cdb = new CouchDBStore,
			transport = new Transport(io, location.href);

		cdb.setTransport(transport);

		cdb.sync("mydatabase", "mydocument")
		.then(function () {
			console.log(cdb.toJSON());
		});
	});

Keywords

FAQs

Last updated on 22 Jan 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc