Skip to content

Commit 9ba0171

Browse files
committed
New documentations
1 parent 947938d commit 9ba0171

File tree

1 file changed

+49
-26
lines changed

1 file changed

+49
-26
lines changed

README.md

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,14 @@ Parse Server is an [open source version of the Parse backend](http://blog.parsep
1212
Parse Server works with the Express web application framework. It can be added to existing web applications, or run by itself.
1313

1414
- [Getting Started](#getting-started)
15-
- [Running Parse Server](#running-parse-server)
16-
- [Locally](#locally)
17-
- [Docker](#inside-a-docker-container)
18-
- [Saving an Object](#saving-your-first-object)
19-
- [Connect an SDK](#connect-your-app-to-parse-server)
15+
- [Creating your first application](#creating-your-first-application)
16+
- [Saving an Object](#saving-your-first-object)
17+
- [Connect an SDK](#connect-your-app-to-parse-server)
2018
- [Running elsewhere](#running-parse-server-elsewhere)
2119
- [Sample Application](#parse-server-sample-application)
2220
- [Parse Server + Express](#parse-server--express)
2321
- [Logging](#logging)
22+
- [Docker](#inside-a-docker-container)
2423
- [Documentation](#documentation)
2524
- [Configuration](#configuration)
2625
- [Basic Options](#basic-options)
@@ -39,35 +38,43 @@ Parse Server works with the Express web application framework. It can be added t
3938

4039
# Getting Started
4140

42-
April 2016 - We created a series of video screencasts, please check them out here: [http://blog.parseplatform.org/learn/parse-server-video-series-april-2016/](http://blog.parseplatform.org/learn/parse-server-video-series-april-2016/)
41+
Parse-Server is built on the top of node. Before you can get started, you should have the latest version of node and npm installed.
42+
We always recommend you run your server on the LTS versions as we focus on providing the most stability on those versions.
4343

44-
The fastest and easiest way to get started is to run MongoDB and Parse Server locally.
44+
You can find the latest versions of [node.js here](https://nodejs.org/en/).
4545

46-
## Running Parse Server
46+
In order to be fully functional, `parse-server` requires a database to run. You'll need to either have [mongodb](https://www.mongodb.com/download-center) or [postgres](https://www.postgresql.org/download/) setup, locally or remotely.
4747

48-
### Locally
49-
```
50-
$ npm install -g parse-server mongodb-runner
51-
$ mongodb-runner start
52-
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test
53-
```
54-
***Note:*** *If installation with* `-g` *fails due to permission problems* (`npm ERR! code 'EACCES'`), *please refer to [this link](https://docs.npmjs.com/getting-started/fixing-npm-permissions).*
55-
48+
There are many service providers that offer hosting of mongodb and postgres.
49+
50+
:warning: Before creating your first app, your DB should be accessible and running.
51+
52+
## Creating your first application
5653

57-
### Inside a Docker container
54+
In order to create your first application, you can use the `@parse/init` project.
55+
56+
The `@parse/init` project is an interactive command line tool that bootstraps a functional parse-server setup on your local machine.
57+
58+
In order to create your first parse app in the `my-parse-app` folder, run the following command:
59+
60+
```sh
61+
$ npx @parse/init my-parse-app
5862
```
59-
$ docker build --tag parse-server .
60-
$ docker run --name my-mongo -d mongo
61-
$ docker run --name my-parse-server --link my-mongo:mongo -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test
62-
```
6363

64-
You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with the Parse Server.
64+
The script above will create a fully functional `parse-server` setup in `my-parse-app` folder with:
6565

66-
That's it! You are now running a standalone version of Parse Server on your machine.
66+
- `package.json`: the nodejs package definition, that defines the dependencies for your project.
67+
- `cloud`: the folder for your cloud code.
68+
- `cloud/main.js`: the main entrypoint for cloud code.
69+
- `public`: the folder for publicly accessible static contents.
6770

68-
**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`.
71+
You can start the server with the following command:
6972

70-
### Saving your first object
73+
```sh
74+
$ npm start
75+
```
76+
77+
## Saving your first object
7178

7279
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:
7380

@@ -133,7 +140,7 @@ $ curl -X GET \
133140

134141
To learn more about using saving and querying objects on Parse Server, check out the [Parse documentation](http://docs.parseplatform.org).
135142

136-
### Connect your app to Parse Server
143+
## Connect your app to Parse Server
137144

138145
Parse provides SDKs for all the major platforms. Refer to the Parse Server guide to [learn how to connect your app to Parse Server](https://github.com/parse-community/parse-server/wiki/Parse-Server-Guide#using-parse-sdks-with-parse-server).
139146

@@ -200,6 +207,22 @@ Logs are also be viewable in Parse Dashboard.
200207

201208
**Want new line delimited JSON error logs (for consumption by CloudWatch, Google Cloud Logging, etc.)?** Pass the `JSON_LOGS` environment variable when starting `parse-server`. Usage :- `JSON_LOGS='1' parse-server --appId APPLICATION_ID --masterKey MASTER_KEY`
202209

210+
## Inside a Docker container (alternate options)
211+
212+
```
213+
$ git clone https://github.com/parse-community/parse-server
214+
$ cd parse-server
215+
$ docker build --tag parse-server .
216+
$ docker run --name my-mongo -d mongo
217+
$ docker run --name my-parse-server --link my-mongo:mongo -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test
218+
```
219+
220+
You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with the Parse Server.
221+
222+
That's it! You are now running a standalone version of Parse Server on your machine.
223+
224+
**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`.
225+
203226
# Documentation
204227

205228
The full documentation for Parse Server is available in the [wiki](https://github.com/parse-community/parse-server/wiki). The [Parse Server guide](http://docs.parseplatform.org/parse-server/guide/) is a good place to get started. If you're interested in developing for Parse Server, the [Development guide](http://docs.parseplatform.org/parse-server/guide/#development-guide) will help you get set up.

0 commit comments

Comments
 (0)