meteor

Meteor : Access to my public/lib from server

妖精的绣舞 提交于 2019-12-25 16:25:15
问题 According to the Meteor Doc, the public fodler is accessible for both server and client. But, if I just need to use the HTML head elements to access it, how can I do it from server ? I made a lib with very specific functions, and I'm tired of copy pasting them at the top of each of my server .js file. Could anyone give me the tip ? I couldn't find out on google :/ Thanks you, David 回答1: You are making your life harder than necessary. Any folder that is not called client , server , private ,

Properly loading Template.templateName.rendered data context

自作多情 提交于 2019-12-25 14:00:29
问题 I have a template, chartEditPreview , that runs a D3.js chart-drawing function once the rendered callback fires. It looks like this: Template.chartEditPreview.rendered = function() { drawChart(".chart-container", this.data); } Where .chart-container is the target div and this.data is the data for the object in the DB currently being accessed. Problem is, this.data often returns null , seemingly at random. It looks like this has something to do with how the publish/subscribe pattern works —

Facebook OAuth Server: Failed in meteor

女生的网名这么多〃 提交于 2019-12-25 12:48:14
问题 Hi I had managed to let FB log in work, but after I changed "Valid OAuth redirect URIs" setting in FB and than change it back again. Login is not working anymore. My server shows: Error in OAuth Server: Failed to complete OAuth handshake with Facebook. {"access_token":"*******...", "token_type":"bearer","expires_in":5183894} Any ideas? I heard open a new FB app may work, but it can't be like this every time. Thanks you! 回答1: This should solve the problem, edit the meteorite packages file and

Meteor login not working on mobile

泪湿孤枕 提交于 2019-12-25 11:57:29
问题 I am working on a simple mobile web app and I am having trouble logging in... I followed this little sample on making a custom login: http://blog.benmcmahen.com/post/41741539120/building-a-customized-accounts-ui-for-meteor Nothing too tricky here. So I run my meteor server locally. On my computer, through the browser, I can log in and create accounts -- no problem. When I go to my local IP from my iPhone, the website successfully loads but for some reason I am not able to login or create

Meteor/Apollo: SSL Access for HTTPS and WS?

安稳与你 提交于 2019-12-25 11:56:45
问题 I’m trying to get SSL working in Meteor for https and websockets. I’m getting this error: (STDERR) Error: listen EACCES 0.0.0.0:443 Here's my setup. For SSL access I have installed nourharidy/meteor-ssl. I can use any comparable package or approach that people have found useful! As required by nourharidy/meteor-ssl, in server/main.js I have: SSL('/path/to/private/server.key','/path/to/private/server.crt', 443); Here's the rest of my setup: My ROOT_URL environment variable is: https://10.0.1

How can I insert document on server side for Meteor Mongodb?

删除回忆录丶 提交于 2019-12-25 11:05:07
问题 Thanks to Nelson Yeung for uploading excel file and insert to MongoDB. Next, I'm trying to implement this solution on React with MongoDB and insert the document on the server side. I'm done the code that look fine on client side but on the server side it cannot insert the document to the MongoDB. Could anybody help me please? My code is here: On the client side -> import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Meteor } from 'meteor/meteor'; import {

Updating a sub-document through meteor methods via a click function proving problematic

廉价感情. 提交于 2019-12-25 10:59:27
问题 I have a button .toggle-addToSet that captures two integers, this.id which is the current posts' id, and setid (sid) which is an _id of a collection Set which the user has the ability to create as many as they want. The goal is updating a chosen Set of a given _id sid with this.id . It looks like this in the js Template.latestSingle.events({ 'click .toggle-addToSet': function(e, template) { var ob = this.id console.log(ob); var sid = $(e.currentTarget).data('setid'); Meteor.call('addingSets',

Updating a sub-document through meteor methods via a click function proving problematic

感情迁移 提交于 2019-12-25 10:58:33
问题 I have a button .toggle-addToSet that captures two integers, this.id which is the current posts' id, and setid (sid) which is an _id of a collection Set which the user has the ability to create as many as they want. The goal is updating a chosen Set of a given _id sid with this.id . It looks like this in the js Template.latestSingle.events({ 'click .toggle-addToSet': function(e, template) { var ob = this.id console.log(ob); var sid = $(e.currentTarget).data('setid'); Meteor.call('addingSets',

Meteor.js: Using server.call when testing with Chimp

安稳与你 提交于 2019-12-25 10:02:24
问题 I'm having an issue triggering method calls while writing feature tests. I'm not actually given an error in the chimp terminal log, but the server.call line is where the failure is highlighted. I believe this might be related to the folder structure of the app (which I've loosely based on Letterpress) or the order in which the call is defined and then triggered. When I move the method call out to my main.js file (in the root folder of the app), it works without a problem. hooks.js path: /app

Meteor: ReferenceError: require is not defined

跟風遠走 提交于 2019-12-25 09:34:20
问题 I have installed meteorhacks:npm and defined apn in packages.json {"apn": "1.6.2"} . However, I get an error ReferenceError: require is not defined when I run the following code: var apn = Npm.require('apn'), path = Npm.require('path'), apnOptions = Meteor.settings.apnOptions || {}, alertSound = apnOptions.sound || "alert.aiff", apnConnection // default apn connection options apnOptions = _.extend({ cert: path.join(appRootPath, "private", "cert.pem"), key: path.join(appRootPath, "private",