Tag: meteor

meteor铁路由器如何获得POST数据

我正在尝试将POST数据从meteor外部传递到Iron Router路由,但是它不起作用。 请求正文为空。 我已经尝试输出请求体来检查数据是否存在,但它只是空的。 Router.route('/api/gatewaysusers', function() { body = this.request.body; console.log(this.request) // this.response.write(body); this.response.end("Call served"); }, {where: 'server'}) 任何想法 ? 谢谢。

如何访问Meteor中的process.env?

我努力了: alert(process.env.MONGO_URL); 到处都是我的Meteor项目,总是得到: Uncaught ReferenceError: process is not defined 我不确定我做错了什么。 我需要包括什么吗? meteor是用JavaScript编写的,所有相同的API都可用,那么为什么不定义stream程呢?

如何通过meteor来提供HTTP请求

我正在使用meteor创build一个实时stream媒体应用程序。 目前我有一个需要创build一个实时转码选项,所以我正在试图将这个node.js模块与我们的meteor应用程序: https : //github.com/mifi/hls-vod 。 然而,它的工作方式是,你实际上从你的HTML5video标签的src调用app.get(hls /)。 我想知道是否有一种方法可以期待使用meteor的电话。 由于我不能整合meteor,所以我在这方面遇到一些麻烦。 我想知道是否有一个方法来让meteor接收HTTP请求,并根据节点模块发回数据。

错误:捆绑Meteor.js应用程序时没有这样的包

当我的Meteor应用程序被捆绑(使用Meteor UP mup deploy )时,它会在下面给出一组错误。 捆绑之前,我必须使用Meteorite手动安装(全球?)这些软件包吗? $ mup deploy Meteor-UP : Production Quality Meteor Deployments ————————————————– Bundling Started: /var/www/test-app Bundling Error: Command failed: ——————-STDOUT——————- rss: updating npm dependencies — rss… mailchimp: updating npm dependencies — mailchimp… Errors prevented bundling: While building the application: error: no such package: 'database-forms' error: no such package: 'crypto-md5' error: no […]

获取meteor电话返回条纹支付响应

我一直在与meteor和条纹包一起工作,试图制造一个客户。 所以首先我有我的客户端代码调用服务器上的方法,所以当点击我有client.js: Meteor.call('usersignup', function (error, result) { console.log (result); }); 所以这就调用了server.js上的Method: var Future = Npm.require('fibers/future'); var stripe = StripeAPI('my key'); // secret stripe API key Meteor.methods({ usersignup: function(cusEmail){ var fut = new Future(); stripe.customers.create( { email: cusEmail }, function(err, customer) { if (err) { console.log(err); fut.ret; } fut.ret(customer); } ); return fut.wait(); }, userfail: function(cusid){ […]

Meteor.js集合在客户端上为空

为什么myCollection.find().fetch()即使在if(data){…}内进行调用,也会返回一个空数组[] 。 if语句是否确保在执行console.log()之前已经检索到集合? Template.chart.rendered = function() { var data = myCollection.find().fetch(); if(data) { console.log(data); } $('#chart').render(); } 这会在浏览器Javascript控制台中返回[] 。

Meteor.js Cordova错误:错误白名单拒绝

在iPhone上运行Meteor.js Cordova iOS应用程序时,应用程序中的某些图像无法加载,XCode控制台显示错误 ERROR whitelist rejection: url='https://d2xngy2dw7hums.cloudfront.net….. 我们如何添加一些/所有的域到白名单?

meteor在Mac上安装在哪里?

我安装了meteor,并创build了一个应用程序http://docs.meteor.com/#quickstart 在发现者,我搜查meteor,但我找不到它。

meteorjs和fullcalendar

我想用meteorjs在fullcalendar中调整事件大小。 我想恢复input中的date来设置大小。 我尝试了很多像下一个代码一样的东西,但是失败了。 我想在“dd-mm-yy”格式化date。 还请解释如何在我的js文件中使用alaningangular色来防止用户发生点击事件。 谢谢你的帮助。 我的文件.html: <template name="planning"> {{#if isInRole 'view-projects,prof,admin'}} {{>dialog}} <div class="container"> <div id="calendar"> </div> </div> {{/if}} </template> <template name="dialog"> <div class="modal" id="EditEventModal" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close closeDialog" data-dismiss="modal" aria-hidden="true">&times;</button> <h4 class="modal-title" id="">Modification evenment</h4> </div> <div class="modal-body"> <div class="form-group"> <label for="title">Nom du projet</label> […]

在DigitalOcean Ubuntu 14.04中,Webshot在meteor上失败

我正在使用这个代码来生成pdf: let fileUri = process.env.PWD + '/storage/orders-pdf/' + fileName; // Commence Webshot webshot(html_string, fileUri, options, function(error) { fs.readFile(fileUri, function (err, data) { if (err) { return console.log(err); } fs.unlinkSync(fileUri); fut.return(data); }); }); let pdfData = fut.wait(); 但它会引发以下错误: { [Error: ENOENT, open '/opt/holi/storage/orders-pdf/Attributes.pdf'] errno: 34, code: 'ENOENT', path: '/opt/holi/storage/orders-pdf/Attributes.pdf' } 试图使用NPM包https://github.com/brenden/node-webshot然后代码在本地主机完美工作,但在服务器上失败,并引发此错误: 编辑: 即使没有运行webshot: fs.readFile(fileUri, function (err, […]