fix auth options

pull/20/head
Johannes J. Schmidt 11 years ago
parent 2762f738d3
commit ed33974cd3

@ -21,11 +21,14 @@ var noop = function() {};
couchmagick.get({
address: 'httpd.bind_address',
port: 'httpd.port',
// auth: {
// username: pkg.name + '.username',
// password: pkg.name + '.password'
// }
}, function(config) {
auth: {
username: pkg.name + '.username',
password: pkg.name + '.password'
}
}, function(err, config) {
if (err) {
return process.exit(0);
}
var auth = config.auth && config.auth.username && config.auth.password ?
[config.auth.username, config.auth.password].join(':') :
@ -57,9 +60,17 @@ couchmagick.get({
}
nano(couch).db.list(function(err, dbs) {
if (err) {
console.log(err);
couchmagick.error('Can not get _all_dbs: ' + err.description);
return process.exit(0);
}
async.eachSeries(dbs, listen, function() {
couchmagick.info('done.');
process.exit(0);
});
});

@ -1,6 +1,6 @@
{
"name": "couchmagick",
"version": "0.1.1",
"version": "0.1.2",
"description": "Run ImageMagicks `convert` on CouchDB documents.",
"main": "index.js",
"preferGlobal": true,
@ -30,7 +30,7 @@
"async": "~0.2.9",
"event-stream": "~3.0.20",
"couchmagick-listen": "~1.0.6",
"couch-daemon": "~1.1.3",
"couch-daemon": "~1.1.4",
"nano": "~4.2.1"
},
"devDependencies": {

Loading…
Cancel
Save