将解析服务器部署到 Google App Engine

Deploying Parse server to Google App Engine

我正在为 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!';。键应该像这样吗? > 或 'like this' 之类的? 我已经通读了 Parse Migration 指南,但未能解决这个问题。

谢谢!

编辑:如果你想投反对票,至少给我指明正确的方向寻求帮助。

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

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

不确定是否有更简洁的方法来获取它,但应该可以。

这与 npm 不读取 yaml 文件有关(因为它只被 google 应用引擎读取)

我在 github 上问过同样的问题,得到的回复是:

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