meteor

Nginx failing to load CSS and JS files (MIME type error)?

大城市里の小女人 提交于 2020-01-23 04:55:16
问题 I'm getting the following errors on my website: Error: There are multiple templates named 'velvet'. Each template needs a unique name. 1b1a247fc034d5089f331ec9540138ff6afd5f39.js:75:306 The stylesheet http://webmill.eu/css/bootstrap.min.css was not loaded because its MIME type, "text/html", is not "text/css". webmill.eu The stylesheet http://webmill.eu/css/font-awesome.min.css was not loaded because its MIME type, "text/html", is not "text/css". webmill.eu The stylesheet http://webmill.eu/css

How can I deploy a secure (HTTPS) Meteor app on Heroku?

醉酒当歌 提交于 2020-01-23 01:26:13
问题 I would like to deploy my Meteor app to Heroku and make it only accessible through HTTPS. Ideally, I want to do this as cheaply as possible. 回答1: Create the Certificate Run these commands to get certbot-auto. certbot-auto should work on most systems wget https://dl.eff.org/certbot-auto chmod 755 certbot-auto This command starts the process of getting your certificate. The -d flag allows you to pass in the domain you would like to secure. Alternatively, without the -d flag, it will pop up a

MongoDB Aggregate & Grouping Issue in MeteorJS

泪湿孤枕 提交于 2020-01-21 19:21:31
问题 Using MongoDB in Meteor JS, how do you use Meteor Aggregate properly? The intended result is to return grouped users by their userId and sum up a boolean field called "progressState" (true/false). For example the document can have: user 001 - true user 001 - false user 001 - true user 003 - false user 005 - true but the intended result would be: user 001: 2 true user 003: 0 true user 005: 1 true etc.. My attempt gives the following error: "exception: FieldPath field names may not start with '

MongoDB - Project only the matching element in an array

混江龙づ霸主 提交于 2020-01-21 12:05:08
问题 How could I get one element from array from Mongo document with following structure: { array : [ {type: 'cat', name: 'George'} {type: 'cat', name: 'Mary'} {type: 'dog', name: 'Steve'} {type: 'dog', name: 'Anna'} ] } For example I need to get Steve, in this case result must looks so: { array : [ {type: 'dog', name: 'Steve'} ] } or so: {type: 'dog', name: 'Steve'} I know how make it while publishing but I need to make it on client side where whole array is available, I could return this value

How can I start a Meteor instance before launching a node-webkit?

戏子无情 提交于 2020-01-21 05:22:08
问题 I have developed a Meteor app. I would like to package this app in the node-webkit app runtime for Chromium. I need the Meteor server process to run locally. How would I go about starting the Meteor server process when a user launches the node-webkit app? I know I can start a NodeJS server instance with node-webkit like this: server.js #!/usr/bin/env node require('http').createServer(function(req, res) { res.writeHead(200, {'content-type': 'text/html'}); res.end('<h1>sup</h1>'); }).listen

Getting a error inserting in to a Meteor Collection

岁酱吖の 提交于 2020-01-21 04:41:29
问题 I am starting to work with Meteor and I am running in to my first issue. I am trying to insert a item in to my collection. I get the below console log error. Can someone help a Meteor noob? insert failed: Method not found This is the line that cause the error: Videos.insert({name: el.value}); My js file: var Videos = new Meteor.Collection("videos"); if (Meteor.isClient) { Template.videoList.video = function() { return Videos.find(); } Template.videoForm.events({ 'click button': function(e, t)

Overlapping Meteor publications

↘锁芯ラ 提交于 2020-01-20 08:43:50
问题 I have a meteor app which has 2 publications for posts. One for all posts and one for featured posts. There are 2 featured posts - "Post 1" and "Post 4". I show featured posts on all pages, while i paginate all posts (including the featured posts) sorted by name. When i travel between pages, the data from the 2 publications get mixed up and show incorrect results. Here is the code: Meteor.publish('posts', function(page) { const skip = parseInt(page && page !== '' ? page : 0) * 3 return Posts

Meteor: Using If condition to conditionally display templates when user clicks a navigation link

假装没事ソ 提交于 2020-01-17 14:51:46
问题 I have some templates corresponding to different places. I am using a navigation bar which has links to different places(Manali). I want the corresponding template to be displayed when a particular link is being clicked. I tried assigning id to each anchor link and use it inside the #if loop of the main file. Like below. {{#if equals id 'badrinath'}} {{> Manali}} {{/if} I created a helper function also for the comparison purpose. UI.registerHelper('equals', function(a, b) { return a == b; });

Meteor production getting fiber error

孤人 提交于 2020-01-17 11:29:09
问题 Meteor production getting the following error.Please Help me.With Node v0.12.1 and centos6.4. /root/test/bundle/programs/server/node_modules/fibers/fibers.js:16 throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibe ^ Error: `/root/test/bundle/programs/server/node_modules/fibers/bin/linux-x64-v8-3.28/fibers.node` is missing. Try reinstalling `node-fibers`? at Object.<anonymous> (/root/test/bundle/programs/server/node_modules/fibers/fibers.js:16:8) at Module._compile

Meteor publish overwrites another publish

不想你离开。 提交于 2020-01-17 08:37:28
问题 I have two publish method as below but when I subscribe to one of the publish method in client search page, it is being overwritten with the other one which is meant for index page. Server Meteor.publish("task.index", function() { TaskCollection.find() } Meteor.publish("task.index.search", function(state) { TaskCollection.find({ state: state }) } Client - search page Meteor.subscribe("task.index.search", state) // this will always be overwritten with "task.index" published collection Client -