amazon-web-services - ParsePy:在 Bitnami Parse Image 中获取 Rest API 密钥的位置
问题描述
我目前正在尝试使用ParsePy python 包连接到我的 parse-server 实例,该实例是从 Bitnami 的 AWS Parse 服务器映像创建的。
但是,包的register()
函数需要一个“rest_key”参数,我相信它是解析服务器实例的 Rest API 密钥。
我在图像随附的以下文件中查找了密钥:
/home/bitnami/apps/parse/htdocs/server.js
并且只找到标记为masterKey
和的参数fileKey
。我在这里找到了一个类似的问题,但这些答案并没有引导我找到在 Bitnami 解析服务器图像中找到密钥的位置。
任何指导都会有所帮助。谢谢!
编辑:相关部分server.js
共享如下:
var express = require('express');
var ParseServer = require('parse-server').ParseServer;
var app = express();
var api = new ParseServer({
databaseURI: "mongodb://root:WcbKujWVdiX2@127.0.0.1:27017/bitnami_parse",
cloud: "./node_modules/parse-server/lib/cloud-code/Parse.Cloud.js",
appId: "APP_ID",
masterKey: "MASTER_KEY",
fileKey: "FILE_KEY",
serverURL: "http://34.242.164.250:80/parse"
});
我尝试在 serverURL 之前为 restAPIKey 添加一个参数,如下所示:
restAPIKey: "REST_API_KEY"
但这只会导致此错误消息:
Traceback (most recent call last):
File "/anaconda3/lib/python3.7/site-packages/parse_rest/connection.py", line 140, in execute
response = urlopen(request, timeout=CONNECTION_TIMEOUT)
File "/anaconda3/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/anaconda3/lib/python3.7/urllib/request.py", line 531, in open
response = meth(req, response)
File "/anaconda3/lib/python3.7/urllib/request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "/anaconda3/lib/python3.7/urllib/request.py", line 569, in error
return self._call_chain(*args)
File "/anaconda3/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/anaconda3/lib/python3.7/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Parse.com has shutdown - https://parseplatform.github.io/
解决方案
推荐阅读
- php - 试图了解如何制作 UpdateOrCreate
- sql - 如何根据列值选择值?
- php - Mailchimp JSON 使用 PHP foreach 和多个键
- php - 我们需要更改帖子的时间线状态
- html - 在 flexbox 容器中,除了最后一项之外的所有项目都向左对齐
- apache-spark - 多级分区表的 Spark (EMR) 分区修剪行为
- android - 在 android 中首次初始化后,回收器 item_view 的高度正在改变
- elasticsearch - Hibernate-Search 6 和 Elasticsearch 集成
- java - 在 Spark Structured Streaming 中遇到问题
- docusignapi - API(签名数),返回签名文档,签名位置