fraxool
fraxool

Reputation: 3219

How to connect to a mongodb Parse-Server with the PHP Parse SDK?

I have a Parse server running and working well with my Swift code. Now, I would like to connect this MongoDB server to my PHP code. But I can't find any documentation on how to do that.

For the moment, I have this code :

ParseClient::initialize( $app_id, $rest_key, $master_key );

How to update it to add my server URL ?

Thanks!

Upvotes: 2

Views: 1872

Answers (2)

fraxool
fraxool

Reputation: 3219

Parse has updated their PHP SDK, there is now a new dedicated function to reference the server URL, which is the following :

ParseClient::setServerURL('http://your-parse-server.com');

Hope it will help someone else!

Upvotes: 1

Aniruddha K.M
Aniruddha K.M

Reputation: 7511

Since i was also struck with some issue and resources were scattered i have grouped them in this answer, i know it's just links but these are links provided by parse and wong be moved or removed in the coming future.

I found this example https://github.com/ParsePlatform/parse-server-example

a little more detailed info about migration is mentioned here https://parse.com/docs/server/guide#migrating

issues with the migrating tools can be tracked here https://github.com/ParsePlatform/parse-server/wiki

there is a wiki page about this found here https://github.com/ParsePlatform/parse-server/wiki

finally, thee whole blog exolaining it can be found here http://blog.parse.com/announcements/introducing-parse-server-and-the-database-migration-tool/

Upvotes: 0

Related Questions