use nano instead of @cloudant (#204)
diff --git a/package.json b/package.json
index 6214f12..7b970ed 100644
--- a/package.json
+++ b/package.json
@@ -13,6 +13,7 @@
"lodash": "^3.10.1",
"request": "^2.83.0",
"@cloudant/cloudant": "3.0.0",
+ "nano": "8.0.1",
"json-stringify-safe": "^5.0.1",
"http-status-codes": "^1.0.5",
"request-promise": "^1.0.2",
diff --git a/provider/app.js b/provider/app.js
index c4e7f7f..ad37994 100644
--- a/provider/app.js
+++ b/provider/app.js
@@ -66,7 +66,7 @@
var method = 'createDatabase';
logger.info(method, 'creating the trigger database');
- var cloudant = require('@cloudant/cloudant')(dbProtocol + '://' + dbUsername + ':' + dbPassword + '@' + dbHost);
+ var cloudant = require('nano')(dbProtocol + '://' + dbUsername + ':' + dbPassword + '@' + dbHost);
if (cloudant !== null) {
return new Promise(function (resolve, reject) {
diff --git a/provider/lib/utils.js b/provider/lib/utils.js
index 5cbbb99..fbb727f 100644
--- a/provider/lib/utils.js
+++ b/provider/lib/utils.js
@@ -62,7 +62,7 @@
if (triggerData.port) {
url += ':' + triggerData.port;
}
- cloudantConnection = Cloudant(url);
+ cloudantConnection = require('nano')(url);
}
try {