Skip to content

Commit

Permalink
fix typo and align & document exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
glynnbird committed Feb 22, 2018
1 parent c070db8 commit ec6ce75
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ e.g.
- `--help` / `-h` - show help message
- `--version` / `-v` - show version number

## Command-line exit codes

- 0 - success
- 1 - invalid source URL
- 2 - invalid target URL
- 3 - `--nomonitor/-n` is only applicable with the `--live/-l` option
- 4 - no source or target database names supplied
- 5 - database names supplied in URLs and as other command-line options
- 6 - runtime error

## Using couchreplicate programmatically

Install the library into your own Node.js project
Expand All @@ -126,7 +136,7 @@ Install the library into your own Node.js project
Load the module into your code

```js
const cm = require('couchmigrate')
const cm = require('couchreplicate')
```

Set off a single replication:
Expand Down Expand Up @@ -171,7 +181,7 @@ or replicate an entire cluster:
auth: true
}

cam.migrateAll(opts).then(() => {
cm.migrateAll(opts).then(() => {
console.log('done')
})
```

0 comments on commit ec6ce75

Please sign in to comment.