Parse Server 本地安装无法使用入门指南

Parse Server local install not working using Getting Started guide

我正在使用此处的说明设置本地 Parse Server:

https://github.com/parse-community/parse-server#locally

它似乎是 运行 但是当我转到 http://localhost:1337/parse 时我得到了一个身份验证错误。我也尝试使用 python:

import json
from http import client

connection = client.HTTPConnection('localhost', 80)
connection.connect()
connection.request('POST', '/parse/sites/cheese', json.dumps({
   "url": "http://www.cheese.com",
   "name": "I love cheese!"
 }), {
   "X-Parse-Application-Id": "myappid",
   "X-Parse-REST-API-Key": "",
   "Content-Type": "application/json"
 })

results = json.loads(connection.getresponse().read())
print (results)

但是,我得到:

TypeError: the JSON object must be str, not 'bytes'

我假设响应是错误对象或其他东西。

无论如何,似乎没有办法配置任何东西,入门文档也没有明确说明如何添加 "X-Parse-REST-API-Key"。

如果我查看安装 parse 的目录,那里只有一个 logs 目录。没有其他的。我希望会有一个配置文件或其他东西。关于如何获得解析服务器的任何指示 运行?

要使用 Python 将对象保存到 Parse Server,请编写如下代码:

import json,httplib
connection = httplib.HTTPSConnection('YOUR.PARSE-SERVER.HERE', 443)
connection.connect()
connection.request('POST', '/parse/classes/GameScore', json.dumps({
       "score": 1337,
       "playerName": "Sean Plott",
       "cheatMode": False
     }), {
       "X-Parse-Application-Id": "${APPLICATION_ID}",
       "X-Parse-REST-API-Key": "${REST_API_KEY}",
       "Content-Type": "application/json"
     })
results = json.loads(connection.getresponse().read())
print results

您可以在此处签入 link: https://docs.parseplatform.org/rest/guide/#creating-objects

请注意示例代码中有一个Python选项。