|
3 | 3 | --- |
4 | 4 |
|
5 | 5 | [](https://github.com/parse-community/parse-server/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Aalpha) |
6 | | -[](https://github.com/parse-community/parse-server/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Abeta) |
7 | 6 | [](https://github.com/parse-community/parse-server/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Arelease) |
8 | 7 | [](https://snyk.io/test/github/parse-community/parse-server) |
9 | 8 | [](https://app.codecov.io/github/parse-community/parse-server/tree/alpha) |
10 | 9 | [](https://github.com/parse-community/parse-dashboard/releases) |
11 | 10 |
|
12 | 11 | [](https://nodejs.org) |
13 | | -[](https://www.mongodb.com) |
| 12 | +[](https://www.mongodb.com) |
14 | 13 | [](https://www.postgresql.org) |
15 | 14 |
|
16 | 15 | [](https://www.npmjs.com/package/parse-server) |
17 | | -[](https://www.npmjs.com/package/parse-server) |
18 | 16 | [](https://www.npmjs.com/package/parse-server) |
19 | 17 |
|
20 | 18 | [][open-collective-link] |
@@ -49,7 +47,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who |
49 | 47 | - [PostgreSQL](#postgresql) |
50 | 48 | - [Locally](#locally) |
51 | 49 | - [Docker Container](#docker-container) |
52 | | - - [Saving an Object](#saving-an-object) |
| 50 | + - [Saving and Querying Objects](#saving-and-querying-objects) |
53 | 51 | - [Connect an SDK](#connect-an-sdk) |
54 | 52 | - [Running Parse Server elsewhere](#running-parse-server-elsewhere) |
55 | 53 | - [Sample Application](#sample-application) |
@@ -100,7 +98,7 @@ A big *thank you* 🙏 to our [sponsors](#sponsors) and [backers](#backers) who |
100 | 98 |
|
101 | 99 | Parse Server is available in different flavors on different branches: |
102 | 100 |
|
103 | | -- The main branches are [release][log_release], [beta][log_beta] and [alpha][log_alpha]. See the [changelog overview](CHANGELOG.md) for details. |
| 101 | +- The main branches are [release][log_release] and [alpha][log_alpha]. See the [changelog overview](CHANGELOG.md) for details. |
104 | 102 | - The long-term-support (LTS) branches are named `release-<version>.x.x`, for example `release-5.x.x`. LTS branches do not have pre-release branches. |
105 | 103 |
|
106 | 104 | ## Long Term Support |
@@ -188,70 +186,9 @@ That's it! You are now running a standalone version of Parse Server on your mach |
188 | 186 |
|
189 | 187 | **Using a remote MongoDB?** Pass the `--databaseURI DATABASE_URI` parameter when starting `parse-server`. Learn more about configuring Parse Server [here](#configuration). For a full list of available options, run `parse-server --help`. |
190 | 188 |
|
191 | | -### Saving an Object |
| 189 | +### Saving and Querying Objects |
192 | 190 |
|
193 | | -Now that you're running Parse Server, it is time to save your first object. We'll use the [REST API](http://docs.parseplatform.org/rest/guide), but you can easily do the same using any of the [Parse SDKs](http://parseplatform.org/#sdks). Run the following: |
194 | | - |
195 | | -```bash |
196 | | -$ curl -X POST \ |
197 | | --H "X-Parse-Application-Id: APPLICATION_ID" \ |
198 | | --H "Content-Type: application/json" \ |
199 | | --d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \ |
200 | | -http://localhost:1337/parse/classes/GameScore |
201 | | -``` |
202 | | - |
203 | | -You should get a response similar to this: |
204 | | - |
205 | | -```js |
206 | | -{ |
207 | | - "objectId": "2ntvSpRGIK", |
208 | | - "createdAt": "2016-03-11T23:51:48.050Z" |
209 | | -} |
210 | | -``` |
211 | | - |
212 | | -You can now retrieve this object directly (make sure to replace `2ntvSpRGIK` with the actual `objectId` you received when the object was created): |
213 | | - |
214 | | -```bash |
215 | | -$ curl -X GET \ |
216 | | - -H "X-Parse-Application-Id: APPLICATION_ID" \ |
217 | | - http://localhost:1337/parse/classes/GameScore/2ntvSpRGIK |
218 | | -``` |
219 | | -```json |
220 | | -// Response |
221 | | -{ |
222 | | - "objectId": "2ntvSpRGIK", |
223 | | - "score": 1337, |
224 | | - "playerName": "Sean Plott", |
225 | | - "cheatMode": false, |
226 | | - "updatedAt": "2016-03-11T23:51:48.050Z", |
227 | | - "createdAt": "2016-03-11T23:51:48.050Z" |
228 | | -} |
229 | | -``` |
230 | | - |
231 | | -Keeping tracks of individual object ids is not ideal, however. In most cases you will want to run a query over the collection, like so: |
232 | | - |
233 | | -```bash |
234 | | -$ curl -X GET \ |
235 | | - -H "X-Parse-Application-Id: APPLICATION_ID" \ |
236 | | - http://localhost:1337/parse/classes/GameScore |
237 | | -``` |
238 | | -```json |
239 | | -// The response will provide all the matching objects within the `results` array: |
240 | | -{ |
241 | | - "results": [ |
242 | | - { |
243 | | - "objectId": "2ntvSpRGIK", |
244 | | - "score": 1337, |
245 | | - "playerName": "Sean Plott", |
246 | | - "cheatMode": false, |
247 | | - "updatedAt": "2016-03-11T23:51:48.050Z", |
248 | | - "createdAt": "2016-03-11T23:51:48.050Z" |
249 | | - } |
250 | | - ] |
251 | | -} |
252 | | -``` |
253 | | - |
254 | | -To learn more about using saving and querying objects on Parse Server, check out the [Parse documentation](http://docs.parseplatform.org). |
| 191 | +Now that you're running Parse Server, it is time to save your first object. The easiest way is to use the [REST API](http://docs.parseplatform.org/rest/guide), but you can easily do the same using any of the [Parse SDKs](http://parseplatform.org/#sdks). To learn more check out the [documentation](http://docs.parseplatform.org). |
255 | 192 |
|
256 | 193 | ### Connect an SDK |
257 | 194 |
|
|
0 commit comments