Skip to content

Commit

Permalink
Updated examples and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonOehlman committed Oct 29, 2013
1 parent c0f7e7c commit b9912a8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ a few examples:

```js
var replimate = require('replimate');
var dbUrl = process.env.COUCHDB_URL || 'http://replimate.iriscouch.com';
var targetUrl = process.env.COUCHDB_URL || 'http://localhost:5984';
var out = require('out');

replimate(dbUrl, function(err, docs) {
Expand All @@ -38,12 +38,12 @@ Creating a new replcication job is pretty easy also:

```js
var replimate = require('replimate');
var targetUrl = process.env.COUCHDB_URL || 'http://localhost:5984';
var opts = {
action: 'replicate',
source: 'http://sidelab.iriscouch.com/seattle_neighbourhood',
target: 'seattle_neighbourhood'
};
var targetUrl = process.env.COUCHDB_URL || 'http://replimate.iriscouch.com';

// create a replication rule to run from the test seattle_neighbourhood db
// to a local copy on the replimate instance
Expand Down Expand Up @@ -75,7 +75,7 @@ required:

```js
var replimate = require('replimate');
var targetUrl = process.env.COUCHDB_URL || 'http://replimate.iriscouch.com';
var targetUrl = process.env.COUCHDB_URL || 'http://localhost:5984';
var out = require('out');

replimate(targetUrl, { action: 'clear-completed' }, function(err) {
Expand Down Expand Up @@ -112,6 +112,18 @@ Cancel a replication task

Request the status of the replication task.

#### _checkState(stateName)

This is a simple helper function that will check the current state
of the specified state name, and if already flagged trigger an event
immediately when a new event listener is coupled to the replication
monitor

#### _monitorState(targetState, interval = 1000)

Monitor the state of the replication job, and update data against
the monitor as it changes.

### Replimate Core Actions

Replimate implements a few core actions that can be invoked through the options
Expand Down
2 changes: 1 addition & 1 deletion examples/clear-completed.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var replimate = require('../');
var targetUrl = process.env.COUCHDB_URL || 'http://replimate.iriscouch.com';
var targetUrl = process.env.COUCHDB_URL || 'http://localhost:5984';
var out = require('out');

replimate(targetUrl, { action: 'clear-completed' }, function(err) {
Expand Down
2 changes: 1 addition & 1 deletion examples/getdocs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var replimate = require('..');
var dbUrl = process.env.COUCHDB_URL || 'http://replimate.iriscouch.com';
var targetUrl = process.env.COUCHDB_URL || 'http://localhost:5984';
var out = require('out');

replimate(dbUrl, function(err, docs) {
Expand Down
7 changes: 0 additions & 7 deletions examples/getreplication.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/start-simple.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
var replimate = require('../');
var targetUrl = process.env.COUCHDB_URL || 'http://localhost:5984';
var opts = {
action: 'replicate',
source: 'http://sidelab.iriscouch.com/seattle_neighbourhood',
target: 'seattle_neighbourhood'
};
var targetUrl = process.env.COUCHDB_URL || 'http://replimate.iriscouch.com';

// create a replication rule to run from the test seattle_neighbourhood db
// to a local copy on the replimate instance
Expand Down

0 comments on commit b9912a8

Please sign in to comment.