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

问题描述 投票:2回答:2

我正在为Google App Engine设置解析服务器,而app.yaml文件中的环境变量所需的值有问题。

例:

env_variables:
# Your MongoDB URI
DATABASE_URI: mongodb://user:[email protected]: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!'; 。 按键应该像这样吗? >或“像这样”或其他? 我已经阅读了“解析迁移”指南,但无法解决此问题。

谢谢!

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

google-app-engine parse-server
2个回答
3
投票

它与npm不读取yaml文件有关(因为这仅由Google App引擎读取)

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

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


1
投票

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

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

不知道是否有一种更干净的方法来获得它,但这应该可行。

© www.soinside.com 2019 - 2024. All rights reserved.