thiagolocatelli / parse4j

Java Library to deal with Parse (parse.com) REST API
http://thiagolocatelli.github.io/parse4j
143 stars 117 forks source link

Connect with MongoDB Database URI? #78

Open SeloSlav opened 7 years ago

SeloSlav commented 7 years ago

Parse.initialize(APP_ID, APP_REST_API_ID, CUSTOM_SERVER_PATH);

Does your method actually handle a CUSTOM_SERVER_PATH or was this a suggestion for developers to implement for after the Parse shutdown (which has already happened)?

For example, I'm using Back4App now. Can I just pass my MongoDB Database URI into this third parameter? Or should I use https://parseapi.back4app.com/? This is the path to the server I believe.

Update: This is actually supported in the latest snapshot build. See the solution here: http://stackoverflow.com/questions/43110992/how-can-i-connect-to-a-hosted-parse-server-over-parse4j/43112054#43112054

ugochirico commented 7 years ago

I'm trying to use the api with back4app. Because the function Parse.initialize(APP_ID, APP_REST_API_ID, CUSTOM_SERVER_PATH); is not implemented yet I changed the source code by changing https://parseapi.back4app.com instead of the parse.com url. But it doesn't work. When I try to create an instance of an object I always got HTTP 404 Not Found from the back4app server. Was you able to use it with back4app?

ugochirico commented 7 years ago

I used the latest revision in the master branch and it works!

SeloSlav commented 7 years ago

This should be documented. Perhaps a new release build! The snapshot build probably isn't so intuitive a choice for developers that are using Parse. Anyway, I got it working :)