Tag: meteor

meteor总是听3000端口

我在Windows 8的WebStorm中创build了一个新的Meteor项目。在“运行/debuggingconfiguration”中,我将端口值设置为3008,但是当我运行应用程序时,它总是在端口3000上工作。 有谁知道Meteor在哪里定义端口号码,或者我怎么改变它? 我已经在整个项目中search了“3000”,“PORT”和“listen”这两个词,但它们并不存在。 我也看到这些问题对我没有帮助,因为他们使用Express来定义端口号硬编码: Node.js / Express.js应用程序只能在端口3000上运行 , Express在端口3000上监听,尽pipe设置为80? 任何帮助将深深感激!

在Meteor中使用fs模块获取Uncaught TypeError _fs2.default.readFile不是函数

嗨,我想在我的Meteor项目中testingFS模块。 我正在使用Meteor 1.3新的es2015模块。 我正在尝试使用节点FS模块来读取文件。 尝试了几个方法,但似乎得到这个相同的错误,当我在浏览器中运行myFunc()。 Uncaught TypeError:_fs2.default.readFile不是函数 import fs from 'fs' myFunc = function(){ fs.readFile('input.txt', function(err, data){ if(err) console.log("Error" + err) console.log("Data from input" + data) }) }

部署Meteor应用程序时发生错误(AssertionError:“undefined”===“function”)

我有一个运行Ubuntu 14.04的数字海洋服务器和我从中部署的Mac。 mupx deploy 一直工作得很好。 现在我已经添加了2个包,并更新到meteor1.4。 我得到这个错误: [139.59.242.839] – Uploading bundle [139.59.242.839] – Uploading bundle: SUCCESS [139.59.242.839] – Sending environment variables [139.59.242.839] – Sending environment variables: SUCCESS [139.59.242.839] – Initializing start script [139.59.242.839] – Initializing start script: SUCCESS [139.59.242.839] – Invoking deployment process [139.59.242.839] – Invoking deployment process: SUCCESS [139.59.242.839] – Verifying deployment [139.59.242.839] x […]

如何从MeteorJS应用程序运行在meteor服务器上的远程外部命令?

我创build了一些login到Duolingo的CasperJS脚本,点击模块并打开,如果我在那里玩。 我创build了一个简单的meteorJS应用程序,我希望当我点击一个button能够执行该casperjs脚本。 我正在寻找有经验的人来帮助我,或者以正确的方式导向我,因为我不知道我能用什么来实现这个小小的个人游戏。 我已经阅读了关于MeteorJS远程过程调用的RPC,并且我已经阅读了PHP和NodeJS,你可以运行一个执行脚本的函数,就像我input命令来运行脚本一样。 我find了这些资源:ShellJS: https : //github.com/shelljs/shelljs和NodeJSsubprocess: https ://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback。 但我没有太多的经验,我正在这样做,以更多地了解CasperJS,MeteorJS。 我需要的是能够运行这个命令 – >“casperjs duolingo.js –engine = slimerjs –disk-cache = no”使用我的Meteorjs应用程序,所以我可以继续创build我的小自动机器人来玩Duolingo整体。 非常感谢您的帮助。

如何在meteor中导入PIxi.js?

我有一个简单的应用程序只是为了testingmeteor和Pixi.js。 我的main.jsx(唯一的脚本文件): import { Meteor } from 'meteor/meteor'; import React from 'react'; import {render} from 'react-dom'; import PIXI from 'pixi.js'; Meteor.startup(()=>{ render( <p>zdzdzd</p>, document.getElementById('container') ); }); 但导入PIXI时出现错误 graceful-fs.js:157 Uncaught TypeError: Cannot read property 'prototype' of undefined patch @ graceful-fs.js:157 meteorInstall.node_modules.graceful-fs.graceful-fs.js @ graceful-fs.js:27 fileEvaluate @ install.js:153 require @ install.js:82 meteorInstall.node_modules.glslify-deps.index.js @ index.js:2 fileEvaluate @ install.js:153 require […]

meteor错误调用方法:找不到方法'questions.insert'

我正在尝试将一个表单(包含testing问题)提交到称为问题的mongo集合中。 我已经引用了运行服务器端代码的文件,我认为它应该都是正常工作。 这是我的代码: //add.html <template name="add"> <h3>This is the add questions page</h3> <form class="add-questions"> <label>Subject</label> <br> <input type="text" name="subject" placeholder="Maths" value="subject"> <br> <label>Topic</label> <br> <input type="text" name="topic" placeholder="IE Algebra" value="topic"> <br> <label>Level</label> <br> <input type="number" name="level" value="3"> <br> <label>Marks</label> <br> <input type="number" name="marks" value="5"> <br> <label>Date</label> <br> <select name="month"> <option> – Month – </option> <option […]

子stream程与meteor

我使用NodeJS的Child-Process来调用我的.exe,但现在我正在使用meteor。 我怎么能打电话给meteor的.exe。 这是Node中使用的代码 const exec = require('child_process').exec; exec('"C:\\Users\\obarrera\\Desktop\\desktop.exe" omar_barrera', (err, stdout, stderr) => { if (err) { console.error(err); return; } console.log(stdout); });

meteorbuild立 – 服务器与ROOT_URL

在部署meteor应用程序时通过meteor build提供的服务器URL与通过在运行meteor服务器期间提供的ROOT_URL环境variables提供的根URL之间有什么区别。 即: meteor build –server http://foo.com VS export ROOT_URL=http://foo.com

使用angularmeteor运行预定作业的最理想的方式

我正在写一个angularmeteor的约会安排应用程序。 其中一个要求就是将文本通知发送给预约的客户。 客户提供一个手机号码。 但基本上,我只想在预约时间前的几分钟发一封电子邮件。 运行angularmeteor云,最好的办法是什么? 所有的约会信息保存到一个mongo分贝。

更新部署到Heroku的Meteor应用程序的Node版本

我有一个Meteor应用程序部署到Heroku。 为了防止拒绝服务(DoS)漏洞,Herokubuild议更新我的应用程序的Node.js版本。 我想在Heroku上将meteor版本更新到1.2.1,节点版本更新到4.8.4。 我已经在packages.json设置了节点版本,但是在部署之后没有更新。 如何更新Heroku上的meteor和节点? 我尝试了下面的命令: heroku run meteor update –release 1.2.1 -a myappname 但它会引发以下错误: bash: meteor: command not found 任何帮助将非常感激。 提前致谢!