Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.xiaoyuin:parse-server-example:'
}
dependencies {
implementation("com.github.xiaoyuin:parse-server-example:")
}
<dependency>
<groupId>com.github.xiaoyuin</groupId>
<artifactId>parse-server-example</artifactId>
<version></version>
</dependency>
libraryDependencies += "com.github.xiaoyuin" % "parse-server-example" % ""
:dependencies [[com.github.xiaoyuin/parse-server-example ""]]
Example project using the parse-server module on Express.
Read the full server guide here: https://parse.com/docs/server/guide
node --version
npm install
mongo
to connect to your database, just to make sure it's working. Once you see a mongo prompt, exit with Control-Dnpm start
export PARSE_MOUNT=/1
before launching the server.heroku create
heroku addons:create mongolab:sandbox
heroku config:set PARSE_MOUNT=/1
git push heroku master
<a title="Deploy to AWS" href="https://console.aws.amazon.com/elasticbeanstalk/home?region=us-west-2#/newApplication?applicationName=ParseServer&solutionStackName=Node.js&tierName=WebServer&sourceBundleUrl=https://s3.amazonaws.com/elasticbeanstalk-samples-us-east-1/eb-parse-server-sample/parse-server-example.zip" target="_blank"><img src="http://d0.awsstatic.com/product-marketing/Elastic%20Beanstalk/deploy-to-aws.png" height="40"></a>
eb init
eb create --envvars DATABASE_URI=<replace with URI>,APP_ID=<replace with Parse app ID>,MASTER_KEY=<replace with Parse master key>
A detailed tutorial is available here: Azure welcomes Parse developers
scalingo create my-parse
scalingo addons-add scalingo-mongodb free
scalingo env-set DATABASE_URI='$SCALINGO_MONGO_URL'
scalingo env-set PARSE_MOUNT=/1
git push scalingo master
You can use the REST API, the JavaScript SDK, and any of our open-source SDKs:
Example request to a server running locally:
curl -X POST \
-H "X-Parse-Application-Id: myAppId" \
-H "Content-Type: application/json" \
-d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
http://localhost:1337/parse/classes/GameScore
curl -X POST \
-H "X-Parse-Application-Id: myAppId" \
-H "Content-Type: application/json" \
-d '{}' \
http://localhost:1337/parse/functions/hello
Example using it via JavaScript:
Parse.initialize('myAppId','unused');
Parse.serverURL = 'https://whatever.herokuapp.com';
var obj = new Parse.Object('GameScore');
obj.set('score',1337);
obj.save().then(function(obj) {
console.log(obj.toJSON());
var query = new Parse.Query('GameScore');
query.get(obj.id).then(function(objAgain) {
console.log(objAgain.toJSON());
}, function(err) {console.log(err); });
}, function(err) { console.log(err); });
You can change the server URL in all of the open-source SDKs, but we're releasing new builds which provide initialization time configuration of this property.