meteor

Meteor deploy - MAIL_URL not being set

倖福魔咒の 提交于 2019-12-22 11:00:56
问题 I recently started deploying a meteor app off of my local machine and it seems that the MAIL_URL property is not being set when deploying to a *.meteor.com domain. No matter what I have tried the email is sent via the default MailGun What I have tried so far. Verified that process.MAIL_URL is set and works locally - ensures that I am setting MAIL_URL correctly Verified that process.MAIL_URL is set on *.meteor.com domain by checking meteor logs - ensures that the process.env settings are being

Meteor reactive function for Template updates

跟風遠走 提交于 2019-12-22 10:59:25
问题 I want to solve the following problem in Meteor.js: I have a HTML element that appears in a template only if the user is logged in: {{#if currentUser}} <input ...> {{/if}} . After the HTML element appears I need to execute a JS command on it. Thus I need some kind of callback that happens after the Template is updated. How to achieve this? None of the reactive data sources I know of do the trick in this case as for example the Meteor.user() source triggers dependencies before the Template is

objectId from url to match with one in the mongo using meteorjs

China☆狼群 提交于 2019-12-22 10:59:23
问题 I am new to meteor js. I got the id from url but i am failing to match it with the id in the mongodb. can any help me Router.map(function () { this.route('post', { template:'viewpost', path: '/post/:_id', data: function () { var id = new ObjectID(this.params._id); return Tasks.findOne({_id: id}); } }); 回答1: I suspect you want to return a single task? You access the _id from this.params where this refers to the router. Router.map(function () { this.route('post', { template:'viewpost', path: '

Meteor templates with CSS transitions

戏子无情 提交于 2019-12-22 10:57:06
问题 Meteor seems to skip CSS transitions when these are triggered through a template helper. Is there a way to work around this? Example: <template name="example-template"> <div class="example {{myhelper}}"></div> </template> Then, "myhelper" would get assigned, through a template helper, a classname that triggers a css transition. But, for some reason, the class is applied but skipping the transition. I assume this conflicts with Meteor's auto-rendering when the template data sources change, but

Meteor Server Websockets

醉酒当歌 提交于 2019-12-22 10:46:45
问题 I am looking to create a websocket on Meteor Server (not client) to connect to an external site . I know the URL I am going to be hitting as well as what data to expect, but I am unclear as to how exactly to create the websocket itself. All the searching I do presents me with solutions for the client, but I have yet to run into anything that serves as a server solution. Is there anything out there I missed that fills this purpose? Atmosherejs.com doesn't list anything, and searching around on

Meteor: Most “Meteoric” way to clear form fields

大憨熊 提交于 2019-12-22 10:44:59
问题 I'm working on an example CRUD application with Meteor.js and am not sure how best to empty out the fields of a form. I need it in two places: when the Submit button is clicked, and when the Cancel button is clicked. I implemented it this way by creating a utility function called clearFormFields() that just uses jQuery to empty their contents, but it doesn't feel as "Meteoric" as it should; I feel it should be scoped better so it doesn't have a global visibility. What am I doing wrong?

Update image using collectionfs

纵然是瞬间 提交于 2019-12-22 10:37:29
问题 I'm using collectionFS to upload an image, the thing is I want my users to be able to upload just one image and then change it(upload a new one). I have the part in place to check if an image is already uploaded but the thing is I can't change the image that is in the db, this is the code I have to insert a new image: 'change .myFileInput': function(event, template) { FS.Utility.eachFile(event, function(file) { var newFile = new FS.File(file); newFile.metadata = { createdBy:Meteor.userId(), }

Install additional node versions in Plesk Onyx

≯℡__Kan透↙ 提交于 2019-12-22 10:35:29
问题 This a guidance not a problem to solve, to help those which have the same issue I had Enable Node support in Plesk Onyx: Install the "Node support" simply from your "update and updates" Plesk interface. Go to your "Node extension" page enable/disable the node versions you need In case you need additional node versions which does not come with the default node support installation: Install the Node Version Manager on your server Install the versions you need e.g. nvm install v4.8.4 Copy paste

Deploying Meteor App to own server

假如想象 提交于 2019-12-22 10:35:16
问题 I have a completed meteor project and is currently deployed on the meteor website. I would like to move it to my own website, which is currently hosted by GoDaddy. How do I install Node and Mongo on my server (linux) and then run my meteor project? I received ssh access to my server, so I assume I can do this, but I'm just not sure how. So how exactly do I proceed? Additional Info: I'm not exactly sure what of linux it is. On GoDaddy, it simply says linux. When I ssh, it shows me: -bash-3.2$:

Meteor does see a remote mongodb instance with MongoInternals.RemoteCollectionDriver

泪湿孤枕 提交于 2019-12-22 10:29:21
问题 I have a issue when using a remote mongodb with the new meteor 1.3 var d = new MongoInternals.RemoteCollectionDriver("<mongo url>"); C = new Mongo.Collection("<collection name>", { _driver: d }); I put it in my collections folder like this if(Meteor.isServer){ var driver = new MongoInternals.RemoteCollectionDriver("mongodb://user:password@localhost:27017/customCollec"); } C = new Mongo.Collection("customCollec", { _driver: driver }); But on the client side a call like this return me : C is