Reputation: 3465
I finished building a Parse Server on Parse Platform. In my old Parse App, I utilize this REST API library for NodeJS
How should I configure (in Parse initialization or Parse library module) to send REST request to this newly built Parse Server. For example, configuration of my Parse Server contains:
{
"appId": my_app_id,
"masterKey": my_master_key,
"port": "1337",
"serverURL": my_server_url,
"publicServerURL": my_server_url,
"mountPath": "/parse",
"databaseURI": my_database_uri"
}
Upvotes: 0
Views: 168
Reputation: 970
The node module is specify the serverUrl to api.parse.com, and origin mount path is '1'. https://github.com/Leveton/node-parse-api/blob/master/lib/Parse.js
Try these 2 step. 1. set Parse._api_host to your host. 2. change your mountPath to '1'.
Another Parse Rest API util is kaiseki, there is a pr to fit open source parse but not been merged. https://github.com/shiki/kaiseki/pull/35
Upvotes: 1
Reputation: 1364
You can use the request module and do something like this:
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
}
});
Hope this helps
Upvotes: 0