Tag: meteor

如何将我的meteor应用程序连接到外部的MongoDB?

我有托pipe在heroku中的Node.JS服务器,我想在我的Meteor应用程序中使用相同的Mongo数据库。 这是我的Node.js服务器中的Mongo数据库: var mongoose = require('mongoose'); var Schema = mongoose.Schema; var messageSchema = new Schema({ requestNumber: String, requestedDateTime: String, reasons: String, state: String, hospital: String, phone: String, status: {type: String, default: 'Pending'}, latestUpdate: Date, createdAt: {type: Date, default: Date.now} }); module.exports = mongoose.model('Requests', messageSchema); 这是我在Meteorcollections: Requests = new Mongo.Collection("requests"); Requests.attachSchema(new SimpleSchema({ requestNumber: {type: String}, requestedDateTime: […]

使用meteor与咖啡和玉:callback .call不是一个函数

我一直在用Coffeescript和Jade尝试Meteor。 而对于最基本的应用程序,我写了下面的代码。 main.coffee import './hello.coffee' import './main.jade' main.jade head title Chatter body h1 Welcome to Chatter! +hello hello.coffee import { Template } from 'meteor/templating' import { ReactiveVar } from 'meteor/reactive-var' import './hello.jade' Template.hello.onCreated helloOnCreated: -> @counter = new ReactiveVar 0 return Template.hello.helpers counter: -> Template.instance().counter.get() Template.hello.events 'click button': (event, instance) -> instance.counter.set instance.counter.get() + 1 […]

meteor – 加载/刷新页面时出错:跟踪器afterFlush函数的exception:未定义

如上所述,我得到一个错误和一个空的页面(但包括导航栏的布局在那里)被显示。 当我通过浏览器刷新链接或万一通过浏览器直接访问链接时,总是会出现此错误。 一切都很好,当我使用我的导航栏浏览模板。 所以,在页面真正的“加载”之后,我看不到任何数据。 我在Windows上使用Meteor Blaze。 这是一个截图: 图片和其他数据都没有显示。 我不知道,如果这是100%的行为的原因,但总是如果这种行为发生,我得到这个错误消息在客户端控制台: 跟踪器afterFlush函数的exception:未定义 和 TypeError:无法读取Blaze.TemplateInstance中未定义的属性“用户名”。 ( http:// localhost:3000 / app / client / templates / common / navigation.js?hash = 142e989d312ba94a4b875a71e5e557bdd5255272:3:40 ) http:// localhost:3000 / packages / blaze.js?hash = f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3398: 22位于FireCallbacks( http:// localhost:3000 / packages / blaze.js?hash = f33d3dfed63a491d24e3aa07ad66c24b5fe8c761 )上的Function.Template._withTemplateInstanceFunc( http:// localhost:3000 / packages / blaze.js?hash = f33d3dfed63a491d24e3aa07ad66c24b5fe8c761:3744:12 ) […]

如何在IBMi / AS400上安装MeteorJS

我想知道是否有可能安装MeteorJS AS400(IBMi),因为它能够运行Node.js,MongoDB,… 我通过“curl”快速testing了安装,但是我有一个消息说这个平台不受支持。 有人会通过NPM软件包进行testing吗? 在那里我有一个疑问:是JS中的所有meteor代码,还是有一个二进制层,使它不可能?

第二次“new CouchDB.Database(queueDb);”时引发错误

我正在使用meteor-couchdb,并尝试连接到数据库进行API调用,并执行所需的操作。 dbName = new CouchDB.Database('db_name'); 但是,当再次进行API调用时会抛出错误 Error: A method named '/db_name/insert' is already defined 根据API调用,我应该能够select需要连接的Db。 我尝试在节点的方式,即 Cloudant.use('db_name'); 但是,然后meteor是我的服务器端框架,我需要asynchronous处理同步使用async await或Meteor.wrapAsync()。 什么是build议的方法来连接到数据库并执行操作,每当一个API调用?

meteor在运行时更改数据库

我有三个数据库即, main_db它是默认的加载数据库。 我想login后加载数据库。 数据库是: – main_db – > user_collection psm_2017_db – > abc_collection – > xyz_collection psm_2018_db – > abc_collection – > xyz_collection 这是我的项目结构 这是我的login脚本。 client |->login |->login.js Template.login.rendered = function(){ SessionStore.set("login_user",false); }; Template.login.events({ 'submit #formLogin': function (event, target){ event.preventDefault(); var email = target.find('#loginEmail').value; var password = target.find('#loginPassword').value; // console.log(email +" "+password); Meteor.loginWithPassword(email, password, function(err){ […]

在meteor应用程序与Facebook连接logincallback

我如何订阅一个callbackMeteor.loginWithFacebook()或Meteor.loginWithGoogle()方法? 如果没有这样的事情,什么是一个很好的解决方法?

运行Meteor bundle的Raspberry Pi会抛出调用堆栈exception

我已经在Raspberry Pi上安装了Node.js,我正在试图运行Meteor.js排行榜的例子。 我已经捆绑了它,并将其复制到Pi。 我已经安装了我的MONGO_URL和NPM光纤(经过一些麻烦)。 当我尝试运行时: $ node main.js 我得到Maximum call stack size exceededexception。 /home/pi/bundle/server/server.js:143 }).run(); ^ RangeError: Maximum call stack size exceeded 我用–trace运行命令,得到这个: /home/pi/bundle/server/server.js:143 1: GetLineNumber+56(this=0x4e92928d <JS Object>, 0x26693f79 <JSMessageObject>) { 2: ScriptLocationFromPosition+64(this=0x26693f25 <a Script value = 0x4e953839 <Script>>, 4636, 0x4e9080a1 <true>) { 3: ScriptLineFromPosition+60(this=0x26693f25 <a Script value = 0x4e953839 <Script>>, 4636) { 4: ScriptLineCount+40(this=0x26693f25 […]

meteor添加包不复制文件

我刚安装了meteor。 不过,我正在尝试添加一些软件包到我的应用程序,但是当我运行meteor添加主干时,它只是说: backbone: A minimalist client-side MVC framework 但我的目录不会改变 – >没有新的文件被添加。 $ meteor –version Meteor version 0.4.2 (19e42c4ec8)

MeteorJS基本的jQuery使用

在一个干净的meteor应用程序与添加jquery包,我试图使用基本的jQuery的CSSselect器。 我究竟做错了什么? 非工作的例子可以在这里find: http : //jquery-test.meteor.com/ JavaScript直接放置在生成的template.hello.events方法的下面。 JS: $("#foo").click( function() { console.log("clicked!"); }); HTML: <button id="foo" style="border: 10px">This is a test div</button>