Skip to content

Commit 6969512

Browse files
committed
DEVEXP-587 : Update README to include an example for connecting to MarkLogic Cloud
1 parent bbfb137 commit 6969512

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ collection into the Documents database using MarkLogic's built-in REST server
3737
at port 8000:
3838

3939
```javascript
40-
var marklogic = require('marklogic');
40+
const marklogic = require('marklogic');
4141

42-
var db = marklogic.createDatabaseClient({
42+
const db = marklogic.createDatabaseClient({
4343
host: 'localhost',
4444
port: '8000',
4545
database: 'Documents',
@@ -48,6 +48,14 @@ var db = marklogic.createDatabaseClient({
4848
authType: 'DIGEST'
4949
});
5050

51+
// For MarkLogic Cloud
52+
const db = marklogic.createDatabaseClient({
53+
apiKey: 'changeme',
54+
host: 'example.beta.marklogic.com',
55+
authType: 'cloud',
56+
basePath: '/marklogic/test'
57+
});
58+
5159
db.createCollection(
5260
'/books',
5361
{author: 'Beryl Markham', ...},

0 commit comments

Comments
 (0)