javascript - 来 self 的 app.meteor.com 的 Meteor.http.call()

标签 javascript meteor ddp

我有一个应用程序,在服务器端函数中使用 Meteor.http.call() 。

var ret = Meteor.http.call("GET", "https://www.quandl.com/api/v1/datasets/SF1/<...>"); 

这可以使用本地主机 meteor 服务器:我将数据返回到 ret 变量中。
我将应用程序部署到 ruleoneinvesting.meteor.com,现在使用相同的调用收到此错误:

XMLHttpRequest cannot load https://ddp--4645-ruleoneinvesting.meteor.com/sockjs/info?cb=p7czcbhqun. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ruleoneinvesting.meteor.com' is therefore not allowed access. The response had HTTP status code 503.

This没有帮助。

最佳答案

对不起,是我的错。我当时用的是

fs.writeFile('../../../../../../data/')

*.meteor.com中不允许写入的文件夹中。
这导致了 HTTP 状态代码 503

关于javascript - 来 self 的 app.meteor.com 的 Meteor.http.call(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33247461/

相关文章:

javascript - 无法在 Angular js 中加载资源错误

javascript - 未捕获的异常 : "Could not convert JavaScript argument" nsresult: "0x80570009 (NS_ERROR_XPC_BAD_CONVERT_JS)" line 150"

javascript - NodeJs - 如何将数据 block 转换为新的缓冲区?

javascript - Meteor:设置 Handlebars 变量 true/false

javascript - 根据 meteor 中的选定值从集合中填充选择字段并进行过滤

javascript - Meteor Random 包 vs randomSeed

javascript - 如何告诉 DDP 有选择地观察某些字段的更改,而不是所有定义的字段..?

javascript - For 循环使用 Django 数据作为输入,使用 CanvasJs 创建散点图

javascript - AngularJS 中的分页刷新问题

java - 我可以在Java服务器上运行Meteor DDP服务器协议(protocol)吗?