From d3cc22c523380a5730b017b76bea39c7b8fa934d Mon Sep 17 00:00:00 2001 From: Chakradhar Rao Jonagam Date: Sat, 17 Jun 2017 15:57:08 -0700 Subject: [PATCH] Update store.js --- api/routes/store.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/api/routes/store.js b/api/routes/store.js index 3d958bb..079ea0f 100644 --- a/api/routes/store.js +++ b/api/routes/store.js @@ -60,7 +60,19 @@ exports.insertDummyData = function(){ ]; db.collection('Categories', function(err, collection) { collection.insert(categories, {safe:true}, function(err, result) { - console.log(err,result,"data inserted"); + console.log(err,result,"cat data inserted"); }); - }); + }); + + var products=[ {name:"Wire",title:"Wire",img:'img/storeImages/08566-01-L_l_th.jpg',images:['storeImages/08566-01-L_l_th.jpg'], + documents:"Wire",features:"Wire",shipping:55,caption:"",price:20,subCat:1}] + + db.collection('Products', function(err, collection) { + collection.insert(products, {safe:true}, function(err, result) { + console.log(err,result,"products data inserted"); + }); + }); + } }; + +