meteor

Nodejs Socket hang up & ECONNRESET - HTTP post request from Meteor to Node js server

ぃ、小莉子 提交于 2019-12-19 05:06:55
问题 I am using a node server to handle all my push notifications services like gcm and apn. I have 2 different servers. One is running Meteor and another is running Node.JS to handle push notifications. (Both are different servers) My main app runs on the Meteor server. I make an HTTP post request to the node.js server to send my notifications. Usually it works fine, but sometimes on the Meteor server I get this error whenever I call the node.js server: socket hang up\n at Object.Future.wait (

Amazon MWS SubmitFeed Content-MD5 HTTP header did not match the Content-MD5 calculated by Amazon

Deadly 提交于 2019-12-19 05:01:41
问题 I know this question is not new but all the solution I get for this are in PHP or my issue is different from them. I am using MWS feed API to submit flat file for Price and Quantity Updates and always get the following error: the Content-MD5 HTTP header you passed for your feed did not match the Content-MD5 we calculated for your feed I would like to ask 3 questions here:- ContentMD5Value parameter is optional as given in doc, but if i not passed that than it will say that you must enter

Advantages of a separate REST backend API?

与世无争的帅哥 提交于 2019-12-19 04:33:11
问题 Context: I'm a beginner programmer, self taught in the hope of making a SPA. I've started with JavaScript, Jquery, PHP and MySQL, and now feel pretty confident with all. I've started with Ember, and am now moving away from having a PHP API to Node. Which has then brought me closer to Meteor... I'm aware I'll need to use Mongo instead, but having an integrated front and back seems to be sensible and have some advantages. So my question is what are the advantages of having a separate REST

Require jQuery in Meteor server side

自作多情 提交于 2019-12-19 04:19:08
问题 I saw: https://groups.google.com/forum/#!topic/meteor-core/ZlPPrH7SqrE http://guaka.org/guaka-jquery-meteor-server-side-try-var-meteor-bootstrap-requirejquery-javascript-0 Server-side jquery How can one parse HTML server-side with Meteor? And I have not figured out a way to include jQuery in Meteor server side. Anyone knows? I tried: Npm.require('jquery') Npm.require('jQuery') But package is not found: # Npm.require('jquery') ►[Error][Error: Cannot find module 'jquery'] 回答1: Try using this

Bug in Meteor/Semantic-UI?

岁酱吖の 提交于 2019-12-19 04:09:37
问题 the usage of a semantic-ui modal window does not work if the root-element is a meteor template: package: semantic-ui-css Error reproduction: hello.html: <template name="hello"> <head> <title>Hello Error</title> </head> <body> <h1>Reproduce error</h1> {{> navigation}} <div class="delete openModal">OPEN<i class="close icon"></i></div> <div id="modalView" class="ui modal"> <div class="content"> <div class="ui fluid input"> Modal Error Test </div> </div> <div class="actions"> <div class="ui

How to store Date and Time in Meteor for range queries?

空扰寡人 提交于 2019-12-19 04:04:12
问题 My app needs to create objects that will have a startDate shown in 3 different timezones in browser. The date must also include the exact time. The date should be stored in such a way that it allows for queries "give me all for date between X and Y" and parse it to 3 timezones. My question is how should I best save (and subsequently retrieve) the date and time so that I can query it later in date ranges, should I maybe use moment.js? What I thought of, is saving the date AND time both in a

Is there any way to know when an meteor subscription is 'valid'?

被刻印的时光 ゝ 提交于 2019-12-19 03:25:12
问题 If I change a Session var and trigger a re-subscription via autosubscribe , is there any callback mechanism to wait until the 'latest' data is down from the server? [1] If you take a look at this gist you'll see some code that logs the content of a collection over time as the subscription changes. A relevant section of the output: at Subscribed; comments are: first post on #1 - second post on #1 at Flushed; comments are: first post on #1 - second post on #1 at Subscription complete; comments

Meteor: How to assign different roles to users during sign up process

橙三吉。 提交于 2019-12-19 02:03:50
问题 I am using the meteor package ian:accounts-ui-bootstrap-3 for accounts and alanning:roles for assigning roles. On the sign up form I have two options one for Doctor and one for Advisor . I want to assign the selected option as a role to that user. Can someone let me know how to do this? I have just started learning meteor and don't know much about its flow. I can assign roles to a user if I create the user manually like this: var adminUser = Meteor.users.findOne({roles:{$in:["admin"]}}); if(

Generating HTTP multipart body for file upload in JavaScript

自古美人都是妖i 提交于 2019-12-19 01:00:06
问题 I'm trying to build HTTP multipart form data in JavaScript (on the server for Meteor.js HTTP request). Here is the Meteor code that sends POST request. var res = HTTP.post(url, { headers: formatted.headers, content: formatted.content }); I'm preparing headers and content using this code. function MultipartFormData(parts) { var boundary = (new Date()).getTime(); var bodyParts = []; _.each(parts, function (value, key) { value.data = (new Buffer(value.data)).toString('binary'); bodyParts.push( '

Meteor/Mongo: Finding and updating certain elements in a collection

落花浮王杯 提交于 2019-12-18 21:55:12
问题 I'm starting off with Meteor and need some help with Mongo. I have a collection of names that I'm displaying on a list and want to be able to update one variable of certain entries in the database based on other criteria. Basically what I want to do is: For every entry where characteristic A = true and B = true, change characteristic C to be false. So far, I've been trying to figure out how Mongo can handle a "for each" loop over the elements of the collection, and for each element check if