Parse Migration Nightmare在声明之前缺少分号

时间:2016-10-06 15:29:15

标签: ios node.js mongodb parse-platform

我在从Parse迁移我的应用时遇到了一些问题。以下是我到目前为止所做的事情:

打开一个mLab帐户并创建了一个mongoDb。 将数据迁移到该数据库。 去了github上的Parse Server Example App页面,下载它,并将目录更改为它。 在该文件的index.js中,我使用以下命令编辑它以匹配我的应用程序:

npm

在此之后,我从终端安装了mongod。 然后我为OS X安装了mongo,启动了mongo服务,然后在新窗口中运行mongo

从这里开始,我在与curl -X POST \ -H "X-Parse-Application-Id: fritchChurch" \ -H "Content-Type: application/json" \ -d '{"HerCell":1337, "title":"Sean Plott", "address":false}' \ http://localhost:1337/parse/classes/FritchDirectory 运行的同一终端窗口中运行以下内容:

> -H "X-Parse-Application-Id": "fritchChurch" \
2016-10-06T10:23:11.818-0500 E QUERY    [thread1] SyntaxError: missing ; before statement @(shell):1:3

> -H "Content-Type": "application/json" \
2016-10-06T10:23:11.819-0500 E QUERY    [thread1] SyntaxError: missing ; before statement @(shell):1:3

> -d '{"HerCell":1337, "title":"Sean Plott", "address":false}' \
2016-10-06T10:23:11.821-0500 E QUERY    [thread1] SyntaxError: missing ; before statement @(shell):1:3

然后我在终端得到这个:

%macro loop;
%let var1=10;
%do %while (&var1.>x);
    counter=&var1.;
    yy=1/(1+x);
    end;
    %let var1=%eval(&var1.-1);
%end;
%mend loop;
data tmp;
    input x;
datalines;
1
2
3
;
run;
%let num=1;
data y;
set tmp;
%loop;
run;

发生了什么事?

1 个答案:

答案 0 :(得分:1)

您可以使用以下命令在本地启动mongo实例和解析服务器实例:

$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY

但是由于你的数据库是在mLab上托管的,你可能不需要启动mongo-runner。您可以尝试仅运行服务器:

$ npm install -g parse-server 
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY

您可以按照快速入门指南here进行操作。或完整指南here

相关问题