Skip to content

Commit 5fb78eb

Browse files
author
Gabriel Montalvo
committed
adds list databases example
1 parent ccfd046 commit 5fb78eb

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ To require the library and initialize it with your account API key:
2323
var mongolab = require('mongolab-data-api')('<Your Api Key Here>');
2424
```
2525

26+
**List available databases**
27+
28+
```javascript
29+
mongolab.listDatabases(function (err, data) {
30+
if (err) { console.log(err); }
31+
else {
32+
console.log(data); // => [db1, db2, db3, ...]
33+
}
34+
});
35+
```
36+
2637
### Methods
2738

2839
#### `listDatabases`

0 commit comments

Comments
 (0)