meteor

How to access app hosted on meteor.com by DDP (WebSocket) protocol?

泪湿孤枕 提交于 2019-12-18 15:55:08
问题 I have a Meteor app A and another application B , not using Meteor, but making some data exchange with the app A . It works fine when I launch A on a machine in my local network, but when I deploy it on meteor.com hosting it doesn't. Server doesn't reply. B uses code new WebSocket("ws://" + host + ":3000/websocket") for connection (DDP protocol). But when I change ws to wss it doesn't work any more even with the machine in LAN - it doesn't reply. I saw that main page of app A when I open it

Meteor: Cloudinary

末鹿安然 提交于 2019-12-18 13:37:19
问题 I am trying to upload a photo with Lepozepo/cloudinary This is my server and client config server: Cloudinary.config({ cloud_name: '*****', api_key: '******', api_secret: '********' }); client: $.cloudinary.config({ cloud_name: "*******" }); I tried to upload the image with a form html form code: <form> <input type="file" id="userimage" name="userimage"/> <button type="submit">Upload</button> </form> And this is my this is the event for the template Template.signup.events({ // Submit signup

Meteor - return asynchronous function to handlebar template?

孤街浪徒 提交于 2019-12-18 13:26:37
问题 I am trying to generate a Flickr url based on a Flickr API call, and then return that result to a handlebars.js template. I am struggling to find a way around asynchronous processes. I have tried to create a callback function, but I am still uncertain how to get a defined object or variable into the HTML template. Here is the code for the Flickr API function: var FlickrRandomPhotoFromSet = function(setID,callback){ Meteor.http.call("GET","http://api.flickr.com/services/rest/?method=flickr

Proper way to handle multiple “pages” in meteor

空扰寡人 提交于 2019-12-18 13:23:40
问题 What is the "formal" way of handling multiple "pages" in meteor? I say "pages" I've seen people do it a couple of different ways. I've seen people create actual full pages, (index.html, about.html, contact.html) and then when links are clicked, you'd write a route to render those pages. But I've also seen people essentially put the code for each of those pages inside <template> tags and then do nifty show/hide type stuff based of what they've clicked, login credentials, etc. 回答1: There are

How do i log something in meteor?

随声附和 提交于 2019-12-18 13:05:27
问题 Can I use something like winston npm in the underlying .meteor/local/build/server/node_modules? or even node-loggly 回答1: The good old Observatory has been revamped and works with Meteor 0.9+ now. Details, usage, demo app via http://observatoryjs.com See also pince, a lightweight logger for Node and Meteor (client/server). Another interesting logging package is trail, which has configurable transports (console, MongoDB, custom), and can centralize logs from the server and multiple clients, and

Insert HTML markup using Meteor

无人久伴 提交于 2019-12-18 12:47:26
问题 How can I display marked up string data in a Meteor template? I need to display a string from my database that contains some basic HTML tags such that the resulting text is properly formatted. It currently just displays the markup text. Here's the relevant part of the template: <span class="description">{{description}}</span> Where {{description}} is the string containing markup (like "hello<br>world"). I'd like it to display hello world rather than hello<br>world I guess this would be

Access user email address in Meteor JS app

妖精的绣舞 提交于 2019-12-18 12:21:38
问题 I am building an app using Meteor and need to access the stored email address of a logged-in user. I am currently using: var userObj = Meteor.user(); console.log(userObj); to access the user. However, I am only able to access the id. The email address is stored in a nested object that looks like this: [Object {address="address@gmail.com", verified=false}] I have tried various ways to traverse the JSON object but can't figure out how to access the value I need. 回答1: Meteor.user().emails[0]

Picking up meteor.js user logout

人盡茶涼 提交于 2019-12-18 12:14:31
问题 Is there any way to pick up when a user logs out of the website? I need to do some clean up when they do so. Using the built-in meteor.js user accounts. I'll be doing some validation using it, so I need a solution that cannot be trigger on behalf of other users on the client side - preferably something completely server side. 回答1: Use the user-status package that I've created: https://github.com/mizzao/meteor-user-status. This is completely server-side. See the docs for usage, but you can

How do you change the reset password URL in meteor?

China☆狼群 提交于 2019-12-18 12:09:58
问题 I am using meteor along with the accounts-password package. I'm rolling my own login and password changing/resetting UI and want to know... How can I customize the password reset link in the reset password email sent as a result of Accounts.resetPassword ? Currently it in the form like so: /#/reset-password/<id>' . Since I am using meteor router, I would like to send in the form '/reset-password/<id>' so I can catch it with the route '/reset-password/:id' . 回答1: See the section on email

How do you change the reset password URL in meteor?

断了今生、忘了曾经 提交于 2019-12-18 12:09:34
问题 I am using meteor along with the accounts-password package. I'm rolling my own login and password changing/resetting UI and want to know... How can I customize the password reset link in the reset password email sent as a result of Accounts.resetPassword ? Currently it in the form like so: /#/reset-password/<id>' . Since I am using meteor router, I would like to send in the form '/reset-password/<id>' so I can catch it with the route '/reset-password/:id' . 回答1: See the section on email