A photo wall implemented by Meteor

Source: Internet
Author: User

Always Love Tech

One of the problems encountered with Meteor for the first time:

Insert Failed:method '/pictures/insert ' not found

The hint does not have this method, then can see in the MongoDB database really did not pictures this collection;

So began google it, found StackOverflow above a problem very similar,

pictures=NewMongo.collection ('Pictures')//meteor.subscribe ("Pictures");//Pictures.allow ({//insert:function () {//return true;//          },//update:function () {//return true;//          },//remove:function () {//return true;//          }//          });

Add the above annotated code and found that there is no egg use;

Later looked for a long time to find to ensure that the server side of the declaration can be, and finally in the server plus

Pictures=new mongo.collection (' Pictures ')
Problem solved

PS: I use JS, and wood useful coffeescript, if with coffee seems to use
@Pictures =new mongo.collection ' Pictures '
will be able to guarantee the overall situation, has not tried ...
Finally have to say Meteor DDP implemented hot code push bunker
Demo has been posted to my GitHub and welcome to discuss Tech
Https://github.com/z-pro/gallery-by-meteor

A photo wall implemented by Meteor

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.