meteor

Updating a specific element in an array with MongoDB / Meteor

☆樱花仙子☆ 提交于 2019-12-19 09:07:24
问题 "users_voted" : [ { "user_id" : "AQG8ECLdBRJ4jwPMG", "score" : "down" } ] Wondering how I would go about updating the users_voted field which is an array objects. I need to have a specific object updated. I know the index at which this object is located, I simply need to figure out how I can update that object in a MongoDB / Meteor collection. This is some pseudo-code that I have to better explain what I mean. Posts.update({_id: post_id}, {$set: {vote_score[index]: u_object}}); So in this

How can I add a cache manifest to a Meteor app?

淺唱寂寞╮ 提交于 2019-12-19 08:57:27
问题 Well, adding it will be no problem, but how can I generate the cache manifest? I would need to somehow get the paths to the combined CSS and JS that Meteor generates. http://www.whatwg.org/specs/web-apps/current-work/#manifests 回答1: Update: As user1506145 said: meteor add appcache https://atmospherejs.com/meteor/appcache This answer is out of date: The answer lies in the bundler package, I autogenerated a manifest file there. You can get a full list of css and js files by hooking into: bundle

How can I add a cache manifest to a Meteor app?

你。 提交于 2019-12-19 08:53:02
问题 Well, adding it will be no problem, but how can I generate the cache manifest? I would need to somehow get the paths to the combined CSS and JS that Meteor generates. http://www.whatwg.org/specs/web-apps/current-work/#manifests 回答1: Update: As user1506145 said: meteor add appcache https://atmospherejs.com/meteor/appcache This answer is out of date: The answer lies in the bundler package, I autogenerated a manifest file there. You can get a full list of css and js files by hooking into: bundle

Meteor with cloud9

岁酱吖の 提交于 2019-12-19 07:39:11
问题 When trying to run meteor in cloud9 I encounter one of the following errors: Running the older modified version from cloud9 I get the error: No dependency info in bundle. Filesystem monitoring disabled. => Errors prevented startup: Exception while bundling application: Error: Package not found: standard-app-packages at self.api.use (/var/lib/stickshift/532a1c97500446885f0002a8/app-root/data/meteor/tools/bundler.js:113:17) at Array.forEach (native) at Function._.each._.forEach (/var/lib

What is the Meteor server-side path to /public?

回眸只為那壹抹淺笑 提交于 2019-12-19 06:55:48
问题 On the Meteor client-side, I know that files in the project's public directory are referenced at '/'. How are they referenced on the server-side? I am trying to get a directory listing with fs.readdir, but I don't know how to construct the path to get to the server side equivalent of the client side '/images/gallery'. Any advice? 回答1: When I use the fs-module I just use './public' for my public folder, works fine on my local install. And then I set it to whatever's correct at the production

What is the Meteor server-side path to /public?

帅比萌擦擦* 提交于 2019-12-19 06:55:21
问题 On the Meteor client-side, I know that files in the project's public directory are referenced at '/'. How are they referenced on the server-side? I am trying to get a directory listing with fs.readdir, but I don't know how to construct the path to get to the server side equivalent of the client side '/images/gallery'. Any advice? 回答1: When I use the fs-module I just use './public' for my public folder, works fine on my local install. And then I set it to whatever's correct at the production

Play Sound In Meteor-Cordova App

ⅰ亾dé卋堺 提交于 2019-12-19 06:39:53
问题 Using meteor without cordova I can play a sound fine in my browser using new Audio('test.mp3').play() where test.mp3 is located in the public folder. However I cannot play the sound once I run my app as a cordova app on a device. What am I doing wrong? Thanks. 回答1: tl;dr Install cordova media plugin meteor add cordova:org.apache.cordova.media@0.2.15 Add audio files to public directory Use /android_asset/www/application/path/to/sound.wav If you look inside this folder in your project, $PROJECT

Why is the database of a Meteor app that has been run once (and never loaded) taking up nearly 3GB?

混江龙づ霸主 提交于 2019-12-19 05:49:33
问题 UPDATE: this was fixed after Meteor v0.4 (2012). For historical purposes: Excerpt from du : 2890768 ./Code/Meteor/QuarterTo/.meteor/local/db/journal 2890772 ./Code/Meteor/QuarterTo/.meteor/local/db 2890776 ./Code/Meteor/QuarterTo/.meteor/local 2890788 ./Code/Meteor/QuarterTo/.meteor 2890804 ./Code/Meteor/QuarterTo I merely ask because it was in my Dropbox and pushed me over my limit. 回答1: When meteor run is executed, it starts mongodb with default mongo settings, so it creates (massive)

How to add a template to body in Meteor inside a package

試著忘記壹切 提交于 2019-12-19 05:23:12
问题 I have this template: <template name="sample"> <h1>Sample</h1> </template> Inside a Meteor app I can add this to body this way (as a partial): {{> sample}} It works. I've even tested to call Template.sample(); inside browser console and it works. When I move this inside my package (i.e. a sample.html file inside my package folder) the template seems to disappear: I get Template.sample() is not a function whenever I call the function and I am not even able to render it as a partial. I have a

How to add a template to body in Meteor inside a package

浪尽此生 提交于 2019-12-19 05:23:12
问题 I have this template: <template name="sample"> <h1>Sample</h1> </template> Inside a Meteor app I can add this to body this way (as a partial): {{> sample}} It works. I've even tested to call Template.sample(); inside browser console and it works. When I move this inside my package (i.e. a sample.html file inside my package folder) the template seems to disappear: I get Template.sample() is not a function whenever I call the function and I am not even able to render it as a partial. I have a