meteor

How to make a simple http request in Meteor from client to server

ぃ、小莉子 提交于 2019-12-19 12:51:06
问题 I'm using Meteor for first time and i'm trying to have a simple http call within a method so i can call this method from the client. The problem is that this async call it's keep running even if i put it within a wrapper. Client side: Meteor.call('getToken', function(error, results) { console.log('entered'); if(error) { console.log(error); } else { console.log(results); } }); Server Side Meteor.methods({ getToken: function(){ // App url var appUrl = 'myAppUrl'; // Key credentials var apiKey =

Meteor error with windows 8.1: your application has errors. waiting for file change

吃可爱长大的小学妹 提交于 2019-12-19 11:50:14
问题 I am trying to create & rum meteor app on win 8.1 pc what I done, I install meteor using official Meteor installer I run following commands at desired path meteor create myapp this was ok then cd myapp this was also ok but when I run command meteor to run the app, I got following result with error [[[[[ ~\F\meteor\resolutions ]]]]] => Started proxy. => Started MongoDB. => Errors prevented startup: While loading plugin `compileTemplatesBatch` from packag module.js:338:15: Cannot find module '.

DDP between two servers doesn't reconnect

▼魔方 西西 提交于 2019-12-19 10:27:33
问题 I have two meteor applications connected via DDP on different servers and server A send data to server B. This is the way they work. Server A Items = new Meteor.Collection('items'); Items.insert({name: 'item 1'}); if (Meteor.isServer) { Meteor.publish('items', function() { return Items.find(); }); } Server B var remote = DDP.connect('http://server-a/'); Items = new Meteor.Collection('items', remote); remote.subscribe('items'); Items.find().observe({ added: function(item) { console.log(item);

Meteor accounts-twitter unable to get working

二次信任 提交于 2019-12-19 10:18:21
问题 I've been having a go at Meteor. I want to use OAuth to authenticate users on my site as I do not want to implement the login features myself. At the moment my website is very simple. A counter, where you click a button the counter increases by one. The idea being when a user goes to another machine and logs in their count is persisted. I have followed the steps on meteor.com/accounts. meteor add accounts-twitter and meteor add accounts-ui Added {{> loginButtons}} to HTML. In Cloud9 terminal

Can't add user attribute using Accounts.onCreateUser

送分小仙女□ 提交于 2019-12-19 10:16:05
问题 I tried to add an attribute 'permission' to all newly created users. But it somehow doesn't work. I use this code to add the attribute Accounts.onCreateUser(function(options, user) { user.permission = 'default'; if (options.profile) user.profile = options.profile; return user; }); But when I retrieve a user object on the client side I can't see the attribute u = Meteor.users.findOne(Meteor.userId) u.permission >undefined What am I doing wrong? 回答1: You create it properly. The problem is that

Meteor: Tracker.autorun / observeChanges & collections not working as expected

守給你的承諾、 提交于 2019-12-19 10:10:10
问题 I am new to using meteor, so I am hoping to receive a very basic explanation of how these functions work, and how I am supposed to be using them. Otherwise, if there is a method that would be better suited to what I am hoping to achieve, the knowledge would be appreciated. The functionality I was hoping to achieve: I have a Mongo collection that contains a number value within documents that are assigned to specific users. I will use the value that I get from the document to populate a width:

Meteor: Trying to serve a static file outside of /public

女生的网名这么多〃 提交于 2019-12-19 10:08:39
问题 TLDR; How can one serve a static file through iron router? If I place a file in /public it bypasses all the hooks I could use in iron router. Long version: I need to log all requests to an image file. Specifically I'd like to persist to Mongodb the querystring in every request such as 'a=1&b=2' from http://domain.com/cat.png?a=1&b=2. I don't see a way of doing this in Meteor. But I could use the iron router hooks such as params.query . Except that any static files in /public get served by

Unable to set mongodb path in meteor on window system

帅比萌擦擦* 提交于 2019-12-19 10:08:05
问题 I googled for the whole day but did not found any solution to change default database in meteor for window system. All findings are as follows MONGO_URL=mongodb://127.0.0.1:27018/meteor meteor Gives error on window system - 'MONGO_URL' is not recognized as an internal or external command, Used settings.json as { "MONGO_URL":"mongodb://127.0.0.1:27018/meteor" } and then meteor --settings ./settings.json but still it does not pick this mongo setting. Finally in my js file if (Meteor.isServer){

How to turn off Velocity unit testing in Meteor? [duplicate]

放肆的年华 提交于 2019-12-19 09:26:31
问题 This question already has answers here : Temporarily disable Meteor testing packages (e.g. Velocity + Mocha) without removing them (3 answers) Closed 4 years ago . I'm using the mike:mocha package and I'm trying to figure out how to disable testing. There are times when I have to demo the app I'm working on in my local machine. For those situations, I would like to run the application without the green dot on the top right. 回答1: After some googling I found that running meteor --production run

Archived Meteor Documentation

你说的曾经没有我的故事 提交于 2019-12-19 09:12:34
问题 Does anyone know where to find MeteorJS documentation for past versions? There does not seem to be an option on the website to switch to an older version like there is on other documentation sites. 回答1: You can download the tag for the version you want and run the app in the /docs directory. The docs directory is a meteor app. All you need to do is meteor inside of it. E.g for version 0.7.2: git clone git@github.com:meteor/meteor.git cd meteor git checkout release/0.7.2 cd docs meteor open