diff --git a/server/viewinsert.js b/server/viewinsert.js index 240d08c..9600f82 100644 --- a/server/viewinsert.js +++ b/server/viewinsert.js @@ -8,10 +8,31 @@ keeper.destroy('_design/titles', function(err, body) { console.log(error); } else { - console.log('deleted'); - console.log(body); + console.log('titles deleted'); + + + keeper.insert( + { + "views": { + "titles": { + "map": function (doc) { emit(null, doc.title); } + } + } + }, '_design/titles', function (error, response) { + if (error) { + console.log(error); + } else + { + console.log('remade : '_design/titles'); + console.log(response); + } + }); + + } }); + +/* keeper.destroy('_design/reducedView', function(err, body) { if (error) { console.log(error); @@ -49,21 +70,7 @@ keeper.destroy('_design/getTagByKey', function(err, body) { } }); -keeper.insert( - { - "views": { - "titles": { - "map": function (doc) { emit(null, doc.title); } - } - } - }, '_design/titles', function (error, response) { - if (error) { - console.log(error); - } else - { - console.log(response); - } - }); + keeper.insert( { @@ -133,4 +140,4 @@ keeper.insert( console.log(response); } - }); + });*/