Posts

Showing posts from September, 2014

What is fixtures in Meteor?

Fixtures in Meteor Basically in short fixtures is js file where you can set default data which will insert automatically when the app runs. Like when you created a app and you want that when you will reset your database or delete all record from database then by default some record became inserted in collection of mongodb. like you can add some data in fixtures if (user.find().count() === 0) {   user.insert({     "name": "Industria de Diseno Textil SA",     "country": "ES",     active:false   });   userinsert({     "name": "Under Armour Inc.",     "country": "US",     active:false   });   user.insert({     "name": "Nike Inc.",     "country": "US",     active:false   }); }  So as you set code in fixures that will check if user collection does not have any record then by default it will insert three record when app

How to write MongoDB query in Meteor?

How to write MongoDB find query in Meteor? Or  How to write MongoDB update query in Meteor? First of all find query  Select symbol.yahoo from user where active='true' user.find({active:true},{fields:{'symbol.yahoo':1}}); Update query in MongoDB Meteor update user set open_at=9pm and trade_date ='2012-12-20' where symbol.yahoo='meteor'  var updata = {             open_at : '9pm',             trade_date : '20122-12-30' } user.update({'symbol.yahoo':'meteor'}, {$set:updata});

How to start Meteor APP?

Image
First of all you need a platform where you can start a Meteor APP You can use Linux or any other platform. If you will use Windows that you can face lots of technical issue of installation issue. So there is very basic tutorial from where you can easily learn Meteor. Step1: www.nitrous.io open this link and register here and login This site provide already set up meteor environment After login create a box and choose Node.js environment. Now you have box somthing like this. Click on IDE step2: You will see somthing like this On the left hand sidebar you will see the directory related to your app. In the bottom you can run linux command 3. Now you need to run in the console a command which install all remaing parts of meteor app parts install meteor Now you can follow this link for more info www.discovermeteor.com/blog/meteor-nitrous/