【问题标题】:Deploying Parse server to Google App Engine将 Parse 服务器部署到 Google App Engine
【发布时间】:2016-01-30 06:33:21
【问题描述】:

我正在为 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!';。键应该是 或“像这样”或其他什么? 我已通读 Parse Migration 指南,但未能解决此问题。

谢谢!

编辑:如果您想投反对票,请至少指出正确的方向以寻求帮助。

【问题讨论】:

    标签: google-app-engine parse-server


    【解决方案1】:

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

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

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

    【讨论】:

    • 感谢您的回复。我检查了链接,发现我需要在npm start 之前做export MASTER_KEY=fooexport APP_ID=foo。干杯。
    【解决方案2】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-19
      • 2017-09-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多