将Parse服务器部署到Google App Engine

时间:2016-01-30 06:33:22

标签: google-app-engine parse-server

我正在为Google App Engine设置一个解析服务器,我在app.yaml文件中遇到环境变量所需的值时出现问题。

示例:

env_variables:
# Your MongoDB URI
DATABASE_URI: mongodb://user:password@123.456.78.901:27017/db

# Absolute path to your cloud code main.js file
CLOUD_PATH: /Users/Name/MyCloudCode/cloud/main.js

# Parse App id
APP_ID: vd234kb78ud63bti76shwExample

# master key
MASTER_KEY: 843nte7fdgdsufy3vrfdsjkExample

# file key
# FILE_KEY: <your-file-key> (I can't find this one)

# Mount path for Parse API
PARSE_MOUNT_PATH: /parse

在我运行npm start的终端中,我收到错误throw 'You must provide an appId and masterKey!';。钥匙应该是&lt;像这样? &GT;还是'喜欢这个'还是什么? 我已阅读Parse Migration指南,但未能解决此问题。

谢谢!

修改:如果您想进行投票,请至少指出正确的方向寻求帮助。

2 个答案:

答案 0 :(得分:3)

这与npm没有读取yaml文件有关(因为它只能由谷歌应用引擎读取)

我在github上问了同样的问题并得到了这个回复:

https://github.com/GoogleCloudPlatform/nodejs-docs-samples/issues/63

答案 1 :(得分:1)

您可以从网址获取文件密钥到您上传到Parse应用程序的任何文件。

http://files.parsetfss.com/<your-file-key>/<parse-image-name>-hello.png.

不确定是否有更清洁的方式来获取它,但这应该有用。