簡體   English   中英

將Node Parse API用於自托管的Parse Server

[英]Using Node Parse API for self-hosted Parse Server

我完成了在Parse平台上構建Parse Server的工作。 在舊的Parse App中,我將這個REST API庫用於NodeJS

我應該如何配置(在Parse初始化或Parse庫模塊中)將REST請求發送到此新建的Parse Server。 例如,我的Parse Server的配置包含:

{
"appId": my_app_id,
"masterKey": my_master_key,
"port": "1337",
"serverURL": my_server_url,
"publicServerURL": my_server_url,
"mountPath": "/parse",
"databaseURI": my_database_uri"
}

節點模塊將指定的serverUrl指定為api.parse.com,原始安裝路徑為“ 1”。 https://github.com/Leveton/node-parse-api/blob/master/lib/Parse.js

試試這兩個步驟。 1.將Parse._api_host設置為主機。 2.將您的mountPath更改為“ 1”。

另一個Parse Rest API實用程序是kaiseki,有一個pr適合開放源代碼解析,但未合並。 https://github.com/shiki/kai​​seki/pull/35

您可以使用請求模塊並執行以下操作:

request({
                url: 'my_server_url',
                //qs: {foo:  bar}, //these are the query string if you want to use them
                method: 'POST', //you get the REST options here
                json: {
                    foo2:   bar1,
                    foo3: bar2
                }
            });

希望這可以幫助

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM