meteor

Configuring Iron Router in Meteor - React

拥有回忆 提交于 2020-01-01 06:54:10
问题 Using Meteor 1.2.0.1 and React. My simple app works great but now I needed iron router. app layout: client\ app.jsx lib\ router.jsx server views\ home.jsx layout.jsx home.jsx: Home = React.createClass({ render() { return ( <div> <h3>Hello World</h3> <p>from home</p> </div> ); } }); layout.jsx: Layout = React.createClass({ render() { return ( <div> {this.props.children} </div> ); } }); routes.jsx: Router.route('/', () => { let page = ( <Layout> <Home/> </Layout> ); React.render(page, document

What is the proper syntax for running a meteor generated node bundle using forever?

孤者浪人 提交于 2020-01-01 05:24:05
问题 In the docs the procedure to run meteor on your own server is to run meteor bundle bundle.tgz Then extract this tarball.. tar -xzvf bundle.tgz Then start a node server MONGO_URL=mongodb://localhost:27017/<dbname> PORT=<server_port> ROOT_URL=http://sub.example.com/ node bundle/main.js I'm trying to use forever to keep the node server up, but when I run the following command (specifics obscured), the forever process doesn't return and I have to CTRL+C to get back to the command line - very

JSON endpoint in Meteor

我怕爱的太早我们不能终老 提交于 2020-01-01 05:23:10
问题 Is there a way to return straight text in a page using meteor? Say someone requested domain.com/get/that-thing, and I just wanted to return the string "52", so that the requester knows that-thing has "52" of something. To my understanding, this is not possible in Meteor because the headers and such are always included. 2 hacks that would work: Write to a file named "that-thing" in anticipation that "that-thing" might be called. This doesn't work in the general case. Put a reverse proxy that

Meteor: How to trigger reRun of helper function after collectionHandle.ready() is true

只愿长相守 提交于 2020-01-01 05:16:22
问题 This a new version of my old question: So thanks to Tom Coleman's help I finally figured out on how to properly check if a subscription is ready() or not. My current code structure looks like this: /client/app.js: eventsHandle = null; groupsHandle = null; // ... // First Deps.autorun(): // Does not depend on any Session var, should just run every time Deps.autorun(function() { eventsHandle = Meteor.subscribe("events", function() { console.log('Deps.autorun(): Events loaded'); }); }); //

How to run meteor on a different port

杀马特。学长 韩版系。学妹 提交于 2020-01-01 05:05:10
问题 How to run meteor on a different port, for example on port 80. I tried to use meteor --port 80 , but I get this error Error: listen EACCES help me please. 回答1: Sounds like it might be access issue on your machine. Check out this following answer, which might be related to your question. Quoting: "As as a general rule processes running without root privileges cannot bind to ports below 1024. So try a higher port, or run with elevated privileges via sudo ." So, you can see that sudo meteor run

Application Error after deploying Meteor 1.0 app on heroku

蹲街弑〆低调 提交于 2020-01-01 04:55:08
问题 I'm trying to deploy a meteor.js app (v 1.0) on heroku using the following buildpack: https://github.com/AdmitHub/meteor-buildpack-horse and following along this tutorial: http://www.growthux.com/ux-html-css-js-growth-hack/installing-meteor-on-heroku My app is more like a static website, i'm using the database to build a simple back office: - storing the admin user and image paths which are then dynamically rendered in my templates. After having created my app on Heroku, set ROOT_URL variable

Why is console.log() not printing anything?

大兔子大兔子 提交于 2020-01-01 04:00:08
问题 Just getting started with Meteor, on Windows. Following the initial instructions, the automatically generated "Hello World" app is running on localhost. The text and button are there, but clicking it doesn't output anything to the console. However, replacing console.log() with alert() does show the text ("You pressed the button") in the pop-up window. 回答1: the console.log() output is printed in the browser. but it gets cleared immediately if you are submitting a form or handling an event as

meteor 0.5.7: how to handle/use Meteor.Collection.ObjectID?

南楼画角 提交于 2020-01-01 03:36:13
问题 I have updated my meteor yesterday and tried using the new Meteor.Collection.ObjectID . But since with no success. First i updated my collections in this way: myCollection = new Meteor.Collection('mycollection', {idGeneration: 'MONGO'} Now, normal new inserts have an _id like Wi2RmR6CSapkmmdfn ... (?) Then i have a collection with an array included. I like to have an unique id for every object in this array. So i $push an object with a field like id: new Meteor.Collection.ObjectID() into my

How to serve HTTP requests over meteor

本秂侑毒 提交于 2020-01-01 03:22:46
问题 I am creating a live streaming application using meteor. Currently I have a need to create a live transcoding option, so I am trying to integrate this node.js module with our meteor application: https://github.com/mifi/hls-vod. However, the way it works is that you actually call the app.get(hls/) from your HTML5 video tag's src. I am wondering if there is a way to expect the call to this get using meteor. Since I can't integrate express with meteor I am having some trouble doing this. I am

how do you run a mongo shell script with a deployed meteor app?

社会主义新天地 提交于 2020-01-01 00:40:08
问题 With mongo you can write scripts that get passed into the shell like: mongo myDB script.js http://docs.mongodb.org/manual/tutorial/write-scripts-for-the-mongo-shell/ but to access the mongo shell of a deployed meteor app is says to do the following: meteor mongo myApp.meteor.com I can't pass the script file with this statement like so: meteor mongo myApp.meteor.com script.js because my deployed app is password protected and the above statement feeds script.js into the password prompt. So the