update couch builder

This commit is contained in:
martind2000 2016-03-21 22:59:00 +00:00
parent 62e9eb63dd
commit b440601ceb
2 changed files with 15 additions and 2 deletions

View File

@ -144,7 +144,7 @@ var doUpdateTagsDB = () => {
});
dbCouch.view('taglist', 'taglist', function (err, body) {
logger.debug(body);
if (!err) {
var outJSON = {};
@ -155,7 +155,7 @@ var doUpdateTagsDB = () => {
}
else {
logger.error('NO TAG LIST EXISTS');
}
});

13
server/seedtags.js Normal file
View File

@ -0,0 +1,13 @@
var nano = require('nano')('http://localhost:5984');
var logger = require('log4js').getLogger();
var db_name = 'keeper';
var keeper = nano.use(db_name);
keeper.insert({type:1,taglist:[]}, function(error, response) {
if (error) {
logger.error(error);
}
else {
logger.info(response);
}
});