meteor

Meteor mail not sending despite setting MAIL_URL environment variable

天涯浪子 提交于 2019-12-24 13:16:15
问题 I'm getting this error message in the terminal "Mail not sent; to enable sending, set the MAIL_URL environment variable." despite setting MAIL_URL environment variable. After this message the whole mail content html gets dumped in the terminal. I'm using 2 meteor packages for sending email: yogiben:pretty-emails and email with mailgun api service. Here's the source code for the mail config and sending email: if Meteor.isServer Meteor.startup -> process.env.MAIL_URL = 'smtp://sandboxid.mailgun

How to add user id information in the schema and also hide form autoforms?

孤人 提交于 2019-12-24 12:50:25
问题 I am learning the ropes of Meteor and kind of lost here. I am using collections2, autoform for building my application. I want to store the collection along with user id information. So that when we retrieve the collection from the server, I want to show only the ones the user created not everything else. here is the schema. ExercisesSchema = new SimpleSchema({ "name": { type: String, label: 'Name' }, "workout.$.weight": { type: String, label: 'Weight' }, "workout.$.reps": { type: String,

jquery find returning only one element (in Meteor)

六月ゝ 毕业季﹏ 提交于 2019-12-24 12:40:14
问题 I have the following links that when clicked on should show fancyboxes--using the jquery plugin here: http://fancyapps.com/fancybox/ <div class="boxes"> <a href="/signup.html" class="btn popup-link fancybox.ajax">Sign Up</a> <a href="/signin.html" class="btn popup-link fancybox.ajax">Sign In</a> </div> The problem i'm having is that the fancybox works only for the first link. In Meteor, I have: Template.mytemplate.rendered = function () { console.log($(this.find('a.popup-link'))); $(this.find

Meteor return value as string

送分小仙女□ 提交于 2019-12-24 12:30:47
问题 This is what I want to achieve. I got two collections: Questions and Answers . When a user answers a question, the answer will set in the Answers collection, and it passes the ID of the question with it. I'm displaying a list with all the questions using this helper: questions: function (){ return Question.find({}); } And this html: <ol> {{#each questions}} <li>{{question}}</li> {{/each}} </ol> I want to display the answers that every user gave, below each question. I want to return the

Environment Variables when deploying Meteor

僤鯓⒐⒋嵵緔 提交于 2019-12-24 12:28:25
问题 Other than PORT , MONGO_URL , where can we find the documentation for all the environmental variables that's exposed by Meteor? In the Meteor docs, I can only find this line PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js Is there a variable that combines all the JS files and minifies them? 回答1: I've been using grasp to answer your question. Here is the command line I used: grasp -reo --no-line-number --no-color --no-filename process.env.__ . 2> /dev/null | sort | uniq

Possible bug when observing a cursor, when deleting from collection

北城以北 提交于 2019-12-24 12:16:08
问题 I've run into an interesting possible bug, but in this case it may be caused by the lack of a function for me to use to delete a document when observing a collection. Or I am misusing observe ... which could very well be the case! Here is sample code that will reproduce the issue I'm having. I'm using the devel branch as of this writing, so I'm not sure if this works in 0.3.5 observebug.html <head> <title>observebug</title> </head> <body> {{> main}} </body> <template name="main"> <h1>Example

Meteor login with facebook

拜拜、爱过 提交于 2019-12-24 12:14:42
问题 I have a meteor app, with packages : useraccounts:bootstrap; service-configuration; accounts-facebook; The facebook side was configured to allow requests from localhost. When using the register/signin with facebook from the atForm, a popup appears EDIT The popup is actually not empty but displays a message 'login complete, click to close' but closed fast because that's how I configured it on the facebook side. And the console logs an error: Exception while invoking method 'login' undefined

Handlebars and MeteorJs for every other or number

断了今生、忘了曾经 提交于 2019-12-24 12:06:30
问题 I'm trying to create a Handlebars.registerHelper() that would wrap my {{>template}} in an {{each items}} for every number I enter. So something like this; {{forevery items 4}} {{> item_row_template}} {{/forevery}} The desired result would be for every 4 items wrap it around a div. <div class="row"> <div class="item_1">item</div> <div class="item_2">item</div> <div class="item_3">item</div> <div class="item_4">item</div> </div> <div class="row"> <div class="item_1">item</div> <div class="item

Meteor dynamic input fields

我怕爱的太早我们不能终老 提交于 2019-12-24 12:01:51
问题 I'm looking for a way to create dynamic input fields in Meteor.js. I've chosen not to use Aldeed's Autoform for greater control over the code. From front end point of view I have no issues to add dynamic fields with +/- button to add and remove fields. What I'm struggling with is the insert statement on the back end. How can one add dynamic insert in Meteor.js? Cheers! 回答1: Essentially you need a reactive array of element that's rendered to the DOM via {{#each}} ... {{/each}}. When the array

Meteor - sorting by timestamp

寵の児 提交于 2019-12-24 11:44:14
问题 I have a note taking app which allows users to add notes. I am trying to render newly created notes on the home page, but when I go to the add note and add a note, then go back to the home page, it shows the new notes(limited to 10) but the new note that was just created is at the bottom of the list, instead of the top. When I refresh the page, it goes to the top like I want it to. How would I get it so that I don't have to refresh the page to get the newly created note at the top? I try to