This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var BB = require('bluebird'); | |
var request = BB.promisifyAll(require('request')); | |
var ziptoo = require('funkit').functional.ziptoo; | |
var resourcesToKey = { | |
'checks' : function(obj){ | |
return obj.checks || obj.check; | |
}, | |
'analysis' : function(obj) { | |
return obj.analysis || obj; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var forward = require('./middleware/forward.js'); //reverse proxy | |
var nano = require('connect-nano'); | |
// instantiate `app` et al | |
//After app.use(express.cookieParser()); | |
app.use(nano('https://username.cloudant.com')), | |
app.use(forward(/\/db\/(.*)/)); |