meteor

Is it possible to use a variable in a meteor collection update/removal?

半世苍凉 提交于 2019-12-20 06:29:10
问题 So I was thinking about refactoring my code in the following way. Meteor.call("RemoveNotification", this._id, function(error, response){ } and Meteor.call("RemoveAvailablePlayer", this._id, function(error, response){ } into Meteor.call("RemoveFromDatabase", "Notifications", this_id, function(error, response){ } and Meteor.call("RemoveFromDatabase", "AvailablePlayers", this_id, function(error, response){ } that way only one meteor method is needed to handle a removal to any collection. Is this

Meteor wrapAsync or bindEnvironment without standard callback signature

梦想的初衷 提交于 2019-12-20 04:59:07
问题 I'm trying to call createTableIfNotExists in this npm package, and do so synchronously in Meteor, server-side. https://www.npmjs.com/package/azure-storage However, the callback signature is of type function(error, result, response) instead of the traditional function(error,result) . 1) Because of that, I cannot use Meteor.wrapAsync and instead have to use Meteor.bindEnvironment 2) I call 'bindEnvironment' as below. Note the callback with 3 arguments. This works, but now I would like to

Creating a numbered list for Meteor data

纵饮孤独 提交于 2019-12-20 04:32:50
问题 Is there a way to get "the number" for a numbered list of the items I have in a Meteor collection. I know I can do it in html, but I feel like it would be much easier to style if I could just drop something in the {{spacebars}}. If there's better terminology I could be using, please let me know. Something like this. List of top 20 movies: {{#each movie}} Movie #{{number}} {{movie_name}} {{review_score}} {{/each}} 回答1: I do not properly understand your question, neither do I know much about

Unable to run meteor app locally windows 7

佐手、 提交于 2019-12-20 04:24:30
问题 I'm having trouble running my app from the command prompt line. I'm not used to running apps, etc. from the terminal. I'll show you what I get below. C:\Windows\system32>meteor create newapp newapp: created. To run your new app: cd newapp meteor C:\Windows\system32>cd newapp/meteor The system cannot find the path specified. C:\Windows\system32>cd newapp C:\Windows\system32>meteor run: You're not in a Meteor project directory. Am I typing it in wrong? What am I doing wrong. I followed the

How to access braintree functionality from Meteor server

佐手、 提交于 2019-12-20 04:22:08
问题 I'm trying to use Braintree in my Meteor application, and I've made a local package of this Braintree packaging, following the instructions of this blog post on the subject, and the install went fine. Now though, I have this code: // defined in server/fixtures.js Gateway = braintree.connect({ environment: braintree.Environment.Sandbox, merchantId: "secret", publicKey: "secret", privateKey: "secret" }); and it's throwing this error: ReferenceError: braintree is not defined (etc....) I then

Scss compiler error: no mixin named transition

不打扰是莪最后的温柔 提交于 2019-12-20 04:08:05
问题 I have a meteor app which uses bower components. When I try to run the app I got an error: Scss compiler error: no mixin named transition which comes from the line of: @include transition(.2s ease-out); What could be cause of this problem? 回答1: @include expects a mixin. In this case it is expecting a mixin named 'transition' and I think you are trying to apply 'transition' as a css property. Check this page out: http://sass-lang.com/guide 来源: https://stackoverflow.com/questions/35482388/scss

SimpleSchema is not a constructor

此生再无相见时 提交于 2019-12-20 03:52:30
问题 My app constantly crashes with this error. TypeError: SimpleSchema is not a constructor at attendances.js (imports/api/attendances/attendances.js:44:27) . I've googled it and the StackOverflow solution doesn't work. I'm running simpl-schema and Collection2 Can anyone tell me whats wrong here? import { Mongo } from 'meteor/mongo'; import SimpleSchema from 'simpl-schema'; const Attendances = new Mongo.Collection('attendances'); Attendances.debug = true; Attendances.allow({ insert: () => true,

Reactivity, isolation, and lists

我的梦境 提交于 2019-12-20 03:45:09
问题 There is something about reactivity I just don't understand, specifically with lists. My problem can be most easily modeled with the leaderboard example ( meteor --create example leaderboard ) First, add this to the client side js (as is done at http://listtest.meteor.com/): Template.player.rendered = function () { console.log('Player rendered'); } ...and then watch the console as you run the app. When you switch the selected scientist, you'll notice that each player re-renders, even when it

AWS SES with Meteor

删除回忆录丶 提交于 2019-12-20 03:07:17
问题 I'm trying to out a Meteor package to interface with AWS SES called tarang:email-ses built by @Akshat. I'm on Meteor @1.* running on a AWS EC2 instance. When I a test run with the code below, no email was sent out. Meteor Code I've set up the AWS access key ID and secret access key and use it here: Meteor.startup(function () { Email.configSES({ AWSAccessKeyID: 'access-key', AWSSecretKey: 'secret-key' }); }); I've also verified my emails and domain. Here I make sure I'm sending from my

meteor 0.9.1 , Mongo is not defined inside my custom Package

谁说我不能喝 提交于 2019-12-20 02:28:29
问题 Getting Exception Mongo is not defined inside my custom Package CODE ABC = new Mongo.Collection('ABC'); ERROR W20140905-17:49:06.809(5.5)? (STDERR) /home/sandeep/.meteor/packages/meteor-tool/.1.0.27.18sl1cs++os.linux.x86_32+web.browser+web.cordova/meteor-tool-os.linux.x86_32/dev_bundle/lib/node_modules/fibers/future.js:173 W20140905-17:49:06.809(5.5)? (STDERR) throw(ex); W20140905-17:49:06.810(5.5)? (STDERR) ^ W20140905-17:49:06.810(5.5)? (STDERR) ReferenceError: Mongo is not defined 回答1: You