meteor

Meteor Images, CSS, “Normal” Web Serving

我怕爱的太早我们不能终老 提交于 2019-12-20 10:30:05
问题 I've seen this question come up a lot; How do I put images on my Meteor website? How do I host "standard" web content with Meteor? I tried adding a <img src="img/myimage.png"> tag but no image shows! How can I host some files on a Meteor site? 回答1: Put the content in a folder named "public" in your project root. You do not need to include /public in your URLs. Any additional folder structure within public is supported. NodeJS routing plugins are not required, as other answers have supplied.

Meteor JS simulate server command line on client html

一世执手 提交于 2019-12-20 10:27:34
问题 I am new to Meteor and want to make a simple app. I am failing to simulate the command line on the server side according to http://terokaisti.blogspot.com/2012/10/writing-terminal-app-with-meteor-js.html The result is just blank when on the client side (Mac OSX Mavericks) I type in a command and hit the "Run" button. I am using the exact code from the site above, except that I have autorun and exec = Npm.require('child_process').exec; Below are my html and js files... TerminalApp.html <head>

How to track the number of anonymous users server-side in Meteor?

荒凉一梦 提交于 2019-12-20 10:27:03
问题 I'm writing a data-sensitive application in Meteor, and am trying to limit the client access to as much information as possible. Therefore, I want to implement server side a way of counting the number of logged-in, and anonymous, users. I have tried a variety of methods. The first was as outlined in this question Server cleanup after a client disconnects, which suggests hooking into: this.session.socket.on("close") However when I did, and tried to change a collection, it threw a "Meteor code

Updating all Meteor packages to latest versions

坚强是说给别人听的谎言 提交于 2019-12-20 10:24:23
问题 I'm developing a Meteor app that isn't yet in production, so I can afford to move quickly when adopting new package versions (useraccounts had a significant version bump a few hours after I'd integrated it, for instance.) This was what I thought meteor update was meant to accomplish. Yet when I run: meteor update from my project, I'm told that packages were updated but .meteor/versions remains unchanged. I can upgrade the package by running meteor add someone:package@whatever , but this just

subdomain support in meteor (like with slack - http://team.slack.com)

徘徊边缘 提交于 2019-12-20 10:20:52
问题 subdomain support in meteor (like with slack - http://team.slack.com) As in slack my app users can create their own subdomains (unique) and depending on the subdomain the data should be loaded, and around this the application would be proceeded. I can use something like http://slack.com?team=TeamName, but i think the subdomain would be much clean and better. Any suggestions/pointers. Thanks. 回答1: Taken from the Meteor forums. Using a DNS wildcard to point *.example.com to my app server, I

Own a subdomain on meteor.com

送分小仙女□ 提交于 2019-12-20 10:18:23
问题 If I publish my app to a subdomain, eg: spartan.meteor.com do I own the subdomain or can some other user take it from me? If I can own it, is there some documentation around it? 回答1: You can set a deploy password for your app. $ meteor deploy -P spartan.meteor.com Any future deploy (or request for logs) will require the same password. 回答2: As an update: As of Meteor v0.7.1, this is no longer relevant. If you don't yet have a meteor developer account, meteor deploy <site> will prompt you for

Using meteor with postgresql

那年仲夏 提交于 2019-12-20 10:08:58
问题 I want to use Meteor to connect to our relational database (PostgreSQL). Is there any experience in connecting Meteor to other databases? I guess we have to write our own connector to use the nice features of Meteor with PostgreSQL. Update: See the answer below. Since this question is still getting attention here is the link to the solution. https://github.com/meteor-stream/meteor-postgres 回答1: Not sure if you are still looking for it but this could help: https://github.com/meteor-stream

Meteor `Deps.autorun` vs `Collection.observe`

一曲冷凌霜 提交于 2019-12-20 10:06:06
问题 What are the pros/cons between using Deps.autorun or Collection.observe to keep a third-party widget in sync with a reactive Meteor.Collection . For example, I am using jsTree to visually show a directory tree that I have stored in my MongoDB. I'm using this code to make it reactive: // automatically reload the fileTree if the data changes FileTree.find().observeChanges({ added: function() { $.jstree.reference('#fileTree').refresh(); }, changed: function() { $.jstree.reference('#fileTree')

How to wire a Backbone View to a meteor handlebars template?

怎甘沉沦 提交于 2019-12-20 09:58:32
问题 Looks like Backbone.view, meteor and handlebars have overlap functionality when it comes to manipulating a section of the DOM. I looked at the ToDo app which is suppose to use Backbone, but in reality, they only use the Router. Backbone views also deal with templates... but they sound so different from meteor templates. Besides, it looks like both backbone & meteor can update the ui on a model update. ok, I am lost!? Who does what? Is Backbone really useful for a Meteor App? Can Backbone &

Dynamically set a CSS property based on a template value

拈花ヽ惹草 提交于 2019-12-20 09:45:30
问题 Is it possible to dynamically set the text color of a input field based on a handlebars.js template value? I am initially creating my html using this template: <div class="board"> <div class="header"> <span class="name">Project</span> <span class="status">Status</span> </div> {{#each projects}} {{> project}} {{/each}} </div> Where projects is an object read from a db. The resulting html (what gets rendered on the page not what is in my html) for each project looks something like this: <div