meteor

Access binaries inside docker

徘徊边缘 提交于 2019-12-25 02:57:16
问题 I am using Meteor and Meteur Up package to push a bundle to server. It uses docker. The problem is that I cannot access graphicsmagick or imagemagick from inside a docker to use it in my app. However it is installed on the server and I can access it when typing gm command. How can I make it accessable? 回答1: It doesn't seem to be configurable at the moment based on this open issue. However, you could always fork the project and modify the start script to use your own custom docker image. If so

Use Blaze UI Component sAlert in Meteor 1.2.1 with Angular

↘锁芯ラ 提交于 2019-12-25 02:48:16
问题 I had a working Meteor App with Angular and Blaze before the 1.2.1 Update came out, but now it´s not possible anymore to use for example {{>sAlert}} in my Application. There is a helper package called "angular-with-blaze", where you have the possibility to include Blaze templates, and I thought I´d wrap the {{>sAlert}} into a custom template, and load it with <template name="custom"> {{>sAlert}} </template> <blaze-template name="custom"></blaze-template> But it tells me, that the template

How to use $min mongo query in Meteor.js?

ε祈祈猫儿з 提交于 2019-12-25 02:47:06
问题 I'm basically trying to create a filter that only displays accounts that have more than one post. return tags.find([{owner: this.userId, count: { $min: 1}}]); It ends up returning nothing. I tried using .min() and other stuff as well. I believe its a standard Mongo query and am wondering if there is a Meteor-specific issue? 回答1: The standard Mongo query for that would use $gt: tags.find({owner: this.userId, count: {$gt: 1}}); 来源: https://stackoverflow.com/questions/24346489/how-to-use-min

MeteorJS and UnderscoreJS: grouping results to plot points on a Google Map

 ̄綄美尐妖づ 提交于 2019-12-25 02:41:12
问题 I am working on a small MeteorJS app that plots points on a map based on popular areas for work. I have this: Template.list.jobs = function() { if(Session.get('currentIndustryOnet')) { jobs = Jobs.find({onet: Session.get('currentIndustryOnet')}).fetch(); // Session.set('jobCount', jobs.count()); var cnt = _.groupBy(jobs, 'address'); console.log(cnt); return Pagination.collection(jobs); } else { jobs = Jobs.find() Session.set('jobCount', jobs.count()); return Pagination.collection(jobs.fetch()

How to make d3 directional force diagram reactive in meteor?

三世轮回 提交于 2019-12-25 02:37:17
问题 Try as I might, I can't seem to get meteor and d3 to play nicely when it comes to a directional force diagram. Since I'm new to both Meteor and d3, I'm not sure where my failing is.. What I'm trying to do is to get (re)create just the following sample graph, but one which is reactive to the mongo data source. Any help at all would be most appreciated! (Click here for live demo) // get the data d3.csv("force.csv", function(error, links) { var nodes = {}; // Compute the distinct nodes from the

Cleanest way to implement a conditional with helper/template in Meteor 0.8.0 (Blaze)

南楼画角 提交于 2019-12-25 02:35:49
问题 In Meteor 0.7 and earlier I had a generalized conditional #withif block helper that combines the #if and #with block helpers: It renders some contents with the data context set to the object in question when it existed, and something else with the default data context if it didn't exist: Handlebars.registerHelper "withif", (obj, options) -> if obj then options.fn(obj) else options.inverse(this) The usage in a template would be something like the following, where doc has a field foo : {{

How to make a query using dates

喜欢而已 提交于 2019-12-25 02:25:51
问题 I need to pull from the DB all rows in a day var i_sDate = "2014-06-21"; // (user input) var startDate = new Date(); var month = parseInt(i_sDate.substr(5,2)) - 1; var day = i_sDate.substr(8,2); startDate.setFullYear(i_sDate.substr(0,4), month, day); startDate.setHours(0, 0, 0, 0); var endDate = new Date(); endDate.setFullYear(i_sDate.substr(0,4), month, day); endDate.setHours(23, 59, 59, 0); var query = {start_time:{"$gte": "ISODate('" + startDate.toISOString() + "')", "$lt": "ISODate('" +

Meteor App Environment Variables

假如想象 提交于 2019-12-25 02:12:13
问题 I'm using meteor and new to it. After some research, I stumbled upon this post. Exactly what I need as of the moment. I need to connect to an external mongodb somewhere in the server. Now the question is where can I find the meteor config file (If ever if it's what I'm looking for) containing all environment variables (For example, MONGO_URL). If it's not any config file then how can I make this possible? 回答1: This is done by setting the environment variable(s) directly on the command line or

Meteor Collections schema not allowing Google authentication

一笑奈何 提交于 2019-12-25 01:51:52
问题 I'm building a simple user account using MeteorJS. A user is only given the option to login/register using Google. If they are registering for the first time, users will be prompted to fill out their profile information after authenticating with their user account. I'm using Collections2 to manage the schema for a user account and attaching it to Meteor.users, which is seen here: var Schemas = {}; Schemas.UserProfile = new SimpleSchema({ firstName: { type: String, regEx: /^[a-zA-Z-]{2,25}$/,

Unable to view user profiles when logged out (Meteor&Iron Router)

谁说胖子不能爱 提交于 2019-12-25 01:37:26
问题 I've built a user profile page for an app that I'm developing, the page works fine when an user is logged in, but when nobody is logged in the templates are empty. My goal is that anyone (even if it isn't registered in the app) is able to see the user profiles. Here is the code: Publication: Meteor.publish('singleUser', function(userId) { if (this.userId) { var findById = Meteor.users.find(userId); return findById.count() ? findById : 'undefined'; } return []; }); Router: this.route('user