meteor

Meteor callback when a template has been re-rendered

倖福魔咒の 提交于 2019-12-20 14:43:58
问题 I currently have a template that has an {{#each}} loop within in it. I am trying to find a way to fire off a specific function whenever that {{#each}} loop has finished. Template.rendered only runs when the template has been rendered for the first time, so that doesn't work unfortunately. Is there anything out there that can do this? 回答1: This is how I would do it : Template.foo.rendered=function(){ // NEW in 0.8.3, use this.computation=Deps.autorun and // this.computation.stop() in destroyed

Full-text search with Meteor.js and MongoDB

爱⌒轻易说出口 提交于 2019-12-20 14:42:51
问题 I am experimenting with Meteor.js and looking for a full-text search engine that can run on Meteor/MongoDB server. It seems that Meteor has not developed this feature. I wonder if there is an existing solution for adding full-text search to Meteor app. The only thing I can find is MongoLantern, which has node.js API. How should I go about adding MongoLantern to my Meteor app? 回答1: MongoDB 2.4 will have a full text search in it. Guide can be found here. If you are prepared to run the

How to run meteor on startup on Ubuntu server

本小妞迷上赌 提交于 2019-12-20 14:08:42
问题 I learn meteorjs and I have a small remote VPS. I want: Set auto pulling from git repository my meteor project. Put script into auto start which run my meteor project as service. For example meteor run -p 80 -- production My server is Ubuntu 12.04 回答1: You should use Ubuntu way, which is Upstart: http://upstart.ubuntu.com/ http://manpages.ubuntu.com/manpages/lucid/man5/init.5.html How to define daemon job: http://newcome.wordpress.com/2012/02/26/running-programs-as-linux-daemons-using-upstart

How to run meteor on startup on Ubuntu server

邮差的信 提交于 2019-12-20 14:07:32
问题 I learn meteorjs and I have a small remote VPS. I want: Set auto pulling from git repository my meteor project. Put script into auto start which run my meteor project as service. For example meteor run -p 80 -- production My server is Ubuntu 12.04 回答1: You should use Ubuntu way, which is Upstart: http://upstart.ubuntu.com/ http://manpages.ubuntu.com/manpages/lucid/man5/init.5.html How to define daemon job: http://newcome.wordpress.com/2012/02/26/running-programs-as-linux-daemons-using-upstart

How can I export from a Meteor package into my app's namespace?

北慕城南 提交于 2019-12-20 13:59:58
问题 I know how to write Meteor packages but I can't seem to figure out how to have all exports land in my app's namespace, as described in this presentation. This particular package is specific to an app I'm building, and it exports only one method that can be regarded as a decorator on the app's singleton. I tried api.export('MyApp.myMethod') but that gives an error native: Bad exported symbol: MyApp.myMethod . If I just api.export('myMethod') , then in the app code I have to call myMethod() ,

Meteor.js Google Oauth issues

旧巷老猫 提交于 2019-12-20 12:40:13
问题 I am trying to setup my Meteor app to use Google logins, Here is my setup in the /server/config.js file Accounts.loginServiceConfiguration.remove({ service: "google" }); Accounts.loginServiceConfiguration.insert({ service: "google", clientId: "XXXXXXX", secret: "XXXXXX" }); I have the setup on google pointed to localhost:3000 I have accounts-ui and accounts-google installed on my meteor app. and I see the google login button on my app's homepage but when I click it I get: Error: redirect_uri

How to prevent load of meteor.local (when building ios app with phonegap)

本秂侑毒 提交于 2019-12-20 12:31:29
问题 This is an extension of a question I asked here, which went unanswered. I am attempting to use the Meteor app on my iPad that I'm hosting on my own remote server. The issue is that when I run the following command, the app builds successfully: sudo meteor run ios-device --mobile-server=XXXX:XXXX The problem begins when I click the build button in Xcode to deploy the app to my device. It seems to build everything OK and even load the data from my remote server. But after a few seconds, it

docker exec is not working in cron

♀尐吖头ヾ 提交于 2019-12-20 11:50:11
问题 I have pretty simple command which is working fine standalone as a command or bash script but not when I put it in crontab 40 05 * * * bash /root/scripts/direct.sh >> /root/cron.log which has following line PATH=$PATH:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/root/ # Mongo Backup docker exec -it mongodb mongodump -d meteor -o /dump/ I tried to change the url of script to /usr/bin/scirpts/ no luck I even tried to run script directly in

docker exec is not working in cron

倾然丶 夕夏残阳落幕 提交于 2019-12-20 11:50:08
问题 I have pretty simple command which is working fine standalone as a command or bash script but not when I put it in crontab 40 05 * * * bash /root/scripts/direct.sh >> /root/cron.log which has following line PATH=$PATH:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin:/root/ # Mongo Backup docker exec -it mongodb mongodump -d meteor -o /dump/ I tried to change the url of script to /usr/bin/scirpts/ no luck I even tried to run script directly in

Meteor public folder not working

故事扮演 提交于 2019-12-20 11:13:34
问题 I'm new to Meteor and I'm trying to understand how to serve static content - images, JS, etc.. I've followed the docs by creating the correct folder structure (which it doesn't really touch on) but making requests to this content just fails over to serving the main app page instead. For instance - putting an image in "app_root"/public/image.png and making a request to localhost:3000/image.png just returns the main app page. Any clue what I'm doing wrong here? Thanks! 回答1: The setup you have