meteor

Why is the arr array not in the users object after creation of it?

我的梦境 提交于 2020-01-15 12:15:13
问题 I am try to make arr a array that every user has but is never sent to client side. A day ago the it stopped being put into user objects on user create. Here is the code; thanks. client Template.create_user.events({ 'click #create-user-button': function() { var username = $("#username").val(); var password = $("#password").val(); var email = $("#email").val(); var bio = $("#bio").val() || ""; if (!username || !password || !email) { } else { Accounts.createUser({ username: username, password:

How to associate a text file in a collection with an image in a fs collection?

人盡茶涼 提交于 2020-01-15 12:07:51
问题 I'm developing a back end in meteor, now I'm trying to associate a text file with images, in some way. Is there a way to storage text files in a fscollection ? How can I associate them in two different collections? These are my two collections: Images = new FS.Collection("Images", { stores: [new FS.Store.FileSystem("Images", {path: "~/padonde/uploads"})] }); Reynosa = new Mongo.Collection("Reynosa"); In the FsCollection, I storage images and in the other collection storage data, but both of

How to associate a text file in a collection with an image in a fs collection?

做~自己de王妃 提交于 2020-01-15 12:07:07
问题 I'm developing a back end in meteor, now I'm trying to associate a text file with images, in some way. Is there a way to storage text files in a fscollection ? How can I associate them in two different collections? These are my two collections: Images = new FS.Collection("Images", { stores: [new FS.Store.FileSystem("Images", {path: "~/padonde/uploads"})] }); Reynosa = new Mongo.Collection("Reynosa"); In the FsCollection, I storage images and in the other collection storage data, but both of

Errors prevented startup: While processing files with static-html

拥有回忆 提交于 2020-01-15 11:46:10
问题 Errors prevented startup: While processing files with static-html As my introduction to meteor I am testing forked package Houston. I ran the following commands. $ mkdir tempspace $ cd tempspace $ git clone https://github.com/gterrono/houston $ meteor create --bare houston $ cd houston $ meteor node -v v4.8.4 # meteor reset # starts from scratch, deletes databases $ meteor update This project is already at Meteor 1.5.2, the latest release. Changes to your project's package version selections

promise server error when creating new meteor project

北战南征 提交于 2020-01-15 10:43:06
问题 I'm getting the following error when I try and create a new meteor project: C:\Users\joshm\AppData\Local\.meteor\packages\meteor-tool\1.4.2_1\mt-os.windows.x86_32\dev_bundle\lib\node_modules\meteor-promise\promise_server.js:190 throw error; ^ SyntaxError: Unexpected token this is a new problem and as a bit of backstory of how I got to this point: 1) yesterday my project was working perfectly, however I realised that not all of my packages were up to date. It appeared if some had dependancies

How to specify a specific css file in METEOR

北慕城南 提交于 2020-01-15 09:09:26
问题 Meteor gathers up all the css into a single file and doesn't allow for a css to be specified for print media. I would like to be able to specific a css file that should not be include in the bundle up of css AND I would like to include : <link rel="stylesheet" href="print-only.css" type="text/css" media="print" /> In the meteor page. 回答1: you can declare CSS media types inside a CSS file. You don't need several different files for that. For example, from http://www.w3schools.com/css/css

Meteor iron-router set route for overlay

我的未来我决定 提交于 2020-01-15 05:25:12
问题 I wanted to implement the overlay effect like Atmospherejs.com by iron-router when overlay has the specific route (https://atmospherejs.com/?q=). Does anyone have any idea? 回答1: It doesn't have route, by the way. As you can see nothing between domain name and query parameter. and It just triggering of UI element on some click. Something like following from CodeDrops might help for your usecase - Demo here: http://tympanus.net/Development/FullscreenOverlayStyles/index5.html Code for same and

Mongodb $addToSet of nested object

心已入冬 提交于 2020-01-15 04:40:12
问题 I am trying to update an array object that is nested under another hash. i.e. { name: "mike", instagram: { id: 3423, slug: 'mike', photos: [] } } Now I would like to use $addToSet to append to the instagram photos object but I don't know how. This works to add photos to a new random key but I would like to use the instagram.photos key MemberCollection.update(this.obj_id, { $addToSet: { instagram_photos: { created_at: new Date(obj.created_time * 1000), image: obj.images.standard_resolution.url

Is there a way to get a GUI representation of Mini Mongo?

青春壹個敷衍的年華 提交于 2020-01-15 04:39:05
问题 I'm learning about Meteor at the moment. Really impressed with the vision of the framework. Meteor retains data on the client side with "Mini Mongo" (http://www.quora.com/Meteor-web-framework/How-does-Meteors-Minimongo-work) - an in browser version of Mongo DB. I've connected Robomongo to the server side DB to surf it with a GUI, and I was wondering if there was a way to get a GUI representation of Mini Mongo. A Chrome dev tools hack perhaps? 回答1: There is a meteorite package developed in one

How to make FlowRouter wait for users collection on the client

一个人想着一个人 提交于 2020-01-15 03:56:11
问题 I'm writing a section of my app which requires the user to have the 'operator' role. I'm checking for this in FlowRouter's triggersEnter function. I want that the user which doesn't have the operator role to be shown a restricted access page. I use FlowRouter, Roles and brettle:accounts-deluxe which auto logs in as guest every visitor. Here is my code, routes.js : FlowRouter.route('/switchboard', { name: 'switchboard', triggersEnter: [function (context, redirect, stop) { if (!Roles