首页 > 解决方案 > 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/

标签: amazon-web-servicesparse-serverbitnami

解决方案


推荐阅读