Skip to content

Commit d43a617

Browse files
committed
Additional README organization.
1 parent bbc3d36 commit d43a617

File tree

2 files changed

+50
-123
lines changed

2 files changed

+50
-123
lines changed

README.md

Lines changed: 43 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
[![Coverage Status](https://img.shields.io/codecov/c/github/ParsePlatform/parse-server/master.svg)](https://codecov.io/github/ParsePlatform/parse-server?branch=master)
55
[![npm version](https://img.shields.io/npm/v/parse-server.svg?style=flat)](https://www.npmjs.com/package/parse-server)
66

7-
Parse Server is an open source version of the Parse backend that can be deployed to any infrastructure that can run Node.js.
7+
Parse Server is an [open source version of the Parse backend](http://blog.parse.com/announcements/introducing-parse-server-and-the-database-migration-tool/) that can be deployed to any infrastructure that can run Node.js.
88

99
Parse Server works with the Express web application framework. It can be added to existing web applications, or run by itself.
1010

11-
Read the announcement blog post here: http://blog.parse.com/announcements/introducing-parse-server-and-the-database-migration-tool/
12-
1311
## Getting Started
1412

15-
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/parseplatform/parse-server-example)
16-
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/?repository=https://github.com/parseplatform/parse-server-example)
17-
<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>
13+
We have provided a basic [Node.js application](https://github.com/ParsePlatform/parse-server-example) that uses the Parse Server module on Express and can be easily deployed using any of the following buttons:
14+
15+
<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"></a> <a title="Deploy to Heroku" href="https://heroku.com/deploy?template=https://github.com/parseplatform/parse-server-example" target="_blank"><img src="https://www.herokucdn.com/deploy/button.png"></a> <a title="Deploy to Azure" href="https://azuredeploy.net/?repository=https://github.com/parseplatform/parse-server-example" target="_blank"><img src="http://azuredeploy.net/deploybutton.png"></a>
16+
17+
### Parse Server + Express
1818

19-
You can create an instance of ParseServer, and mount it on a new or existing Express website:
19+
You can also create an instance of Parse Server, and mount it on a new or existing Express website:
2020

2121
```js
2222
var express = require('express');
@@ -29,7 +29,7 @@ var api = new ParseServer({
2929
databaseURI: 'mongodb://localhost:27017/dev',
3030
cloud: '/home/myApp/cloud/main.js', // Provide an absolute path
3131
appId: 'myAppId',
32-
masterKey: '', //Add your master key here. Keep it secret!
32+
masterKey: 'myMasterKey', // Keep this key secret!
3333
fileKey: 'optionalFileKey',
3434
serverURL: 'http://localhost:1337/parse' // Don't forget to change to https if needed
3535
});
@@ -42,157 +42,77 @@ app.listen(1337, function() {
4242
});
4343
```
4444

45-
## Documentation
46-
47-
Documentation for Parse Server is available in the [wiki](https://github.com/ParsePlatform/parse-server/wiki) for this repository. The [Parse Server guide](https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide) is a good place to get started.
48-
49-
If you're interested in developing for Parse Server, the [Development guide](https://github.com/ParsePlatform/parse-server/wiki/Development-Guide) will help you get set up.
50-
51-
### Migration Guide
52-
53-
The hosted version of Parse will be fully retired on January 28th, 2017. If you are planning to migrate an app, you need to begin work as soon as possible. Learn more in the [Migration guide](https://github.com/ParsePlatform/parse-server/wiki/Migrating-an-Existing-Parse-App).
54-
55-
---
45+
### Standalone Parse Server
5646

57-
#### Basic options:
47+
Configure Parse Server using [environment variables](#configuration). To start the server, just run `npm start`.
5848

59-
* databaseURI (required) - The connection string for your database, i.e. `mongodb://user:[email protected]/dbname`
60-
* appId (required) - The application id to host with this server instance
61-
* masterKey (required) - The master key to use for overriding ACL security
62-
* cloud - The absolute path to your cloud code main.js file
63-
* fileKey - For migrated apps, this is necessary to provide access to files already hosted on Parse.
64-
* facebookAppIds - An array of valid Facebook application IDs.
65-
* serverURL - URL which will be used by Cloud Code functions to make requests against.
66-
* push - Configuration options for APNS and GCM push. See the [wiki entry](https://github.com/ParsePlatform/parse-server/wiki/Push).
49+
You can also install Parse Server globally
6750

68-
#### Client key options:
69-
70-
The client keys used with Parse are no longer necessary with parse-server. If you wish to still require them, perhaps to be able to refuse access to older clients, you can set the keys at initialization time. Setting any of these keys will require all requests to provide one of the configured keys.
71-
72-
* clientKey
73-
* javascriptKey
74-
* restAPIKey
75-
* dotNetKey
76-
77-
#### OAuth Support
51+
`$ npm install -g parse-server`
7852

79-
parse-server supports 3rd party authentication with
53+
Now you can just run `$ parse-server` from your command line.
8054

81-
* Twitter
82-
* Meetup
83-
* Linkedin
84-
* Google
85-
* Instagram
86-
* Facebook
8755

56+
## Documentation
8857

89-
Configuration options for these 3rd-party modules is done with the oauth option passed to ParseServer:
58+
The full documentation for Parse Server is available in the [wiki](https://github.com/ParsePlatform/parse-server/wiki). The [Parse Server guide](https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide) is a good place to get started. If you're interested in developing for Parse Server, the [Development guide](https://github.com/ParsePlatform/parse-server/wiki/Development-Guide) will help you get set up.
9059

91-
```
92-
{
93-
oauth: {
94-
twitter: {
95-
consumer_key: "", // REQUIRED
96-
consumer_secret: "" // REQUIRED
97-
},
98-
facebook: {
99-
appIds: "FACEBOOK APP ID"
100-
}
101-
}
102-
103-
}
104-
```
60+
#### Migrating an Existing Parse App
10561

106-
#### Custom Authentication
62+
The hosted version of Parse will be fully retired on January 28th, 2017. If you are planning to migrate an app, you need to begin work as soon as possible. There are a few areas where Parse Server does not provide compatibility with the hosted version of Parse. Learn more in the [Migration guide](https://github.com/ParsePlatform/parse-server/wiki/Migrating-an-Existing-Parse-App).
10763

108-
It is possible to leverage the OAuth support with any 3rd party authentication that you bring in.
64+
### Configuration
10965

110-
```
111-
{
112-
113-
oauth: {
114-
my_custom_auth: {
115-
module: "PATH_TO_MODULE" // OR object,
116-
option1: "",
117-
option2: "",
118-
}
119-
}
120-
}
121-
```
66+
The following options can be passed to the `ParseServer` object during initialization. Alternatively, you can use the `PARSE_SERVER_OPTIONS` environment variable set to the JSON of your configuration.
12267

123-
On this module, you need to implement and export those two functions `validateAuthData(authData, options) {} ` and `validateAppId(appIds, authData) {}`.
68+
#### Basic options
12469

125-
For more informations about custom auth please see the examples:
70+
* `databaseURI` (required) - The connection string for your database, i.e. `mongodb://user:[email protected]/dbname`
71+
* `appId` (required) - The application id to host with this server instance
72+
* `masterKey` (required) - The master key to use for overriding ACL security
73+
* `cloud` - The absolute path to your cloud code main.js file
74+
* `fileKey` - For migrated apps, this is necessary to provide access to files already hosted on Parse.
75+
* `facebookAppIds` - An array of valid Facebook application IDs.
76+
* `serverURL` - URL which will be used by Cloud Code functions to make requests against.
77+
* `push` - Configuration options for APNS and GCM push. See the [wiki entry](https://github.com/ParsePlatform/parse-server/wiki/Push).
12678

127-
- [facebook OAuth](https://github.com/ParsePlatform/parse-server/blob/master/src/oauth/facebook.js)
128-
- [twitter OAuth](https://github.com/ParsePlatform/parse-server/blob/master/src/oauth/twitter.js)
129-
- [instagram OAuth](https://github.com/ParsePlatform/parse-server/blob/master/src/oauth/instagram.js)
79+
#### Client key options
13080

81+
The client keys used with Parse are no longer necessary with Parse Server. If you wish to still require them, perhaps to be able to refuse access to older clients, you can set the keys at initialization time. Setting any of these keys will require all requests to provide one of the configured keys.
13182

132-
#### Advanced options:
83+
* `clientKey`
84+
* `javascriptKey`
85+
* `restAPIKey`
86+
* `dotNetKey`
13387

134-
* filesAdapter - The default behavior (GridStore) can be changed by creating an adapter class (see [`FilesAdapter.js`](https://github.com/ParsePlatform/parse-server/blob/master/src/Adapters/Files/FilesAdapter.js))
135-
* databaseAdapter (unfinished) - The backing store can be changed by creating an adapter class (see `DatabaseAdapter.js`)
136-
* loggerAdapter - The default behavior/transport (File) can be changed by creating an adapter class (see [`LoggerAdapter.js`](https://github.com/ParsePlatform/parse-server/blob/master/src/Adapters/Logger/LoggerAdapter.js))
137-
* enableAnonymousUsers - Defaults to true. Set to false to disable anonymous users.
88+
#### Advanced options
13889

139-
---
90+
* `filesAdapter` - The default behavior (GridStore) can be changed by creating an adapter class (see [`FilesAdapter.js`](https://github.com/ParsePlatform/parse-server/blob/master/src/Adapters/Files/FilesAdapter.js))
91+
* `databaseAdapter` (unfinished) - The backing store can be changed by creating an adapter class (see `DatabaseAdapter.js`)
92+
* `loggerAdapter` - The default behavior/transport (File) can be changed by creating an adapter class (see [`LoggerAdapter.js`](https://github.com/ParsePlatform/parse-server/blob/master/src/Adapters/Logger/LoggerAdapter.js))
93+
* `enableAnonymousUsers` - Defaults to true. Set to false to disable anonymous users.
94+
* `oauth` - Used to configure support for [3rd party authentication](https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#oauth).
14095

141-
#### Standalone usage
96+
#### Using environment variables
14297

143-
You can configure the Parse Server with environment variables:
98+
You may also configure the Parse Server using environment variables:
14499

145100
```js
146101
PARSE_SERVER_DATABASE_URI
147102
PARSE_SERVER_CLOUD_CODE_MAIN
148103
PARSE_SERVER_COLLECTION_PREFIX
149104
PARSE_SERVER_APPLICATION_ID // required
105+
PARSE_SERVER_MASTER_KEY // required
150106
PARSE_SERVER_CLIENT_KEY
151107
PARSE_SERVER_REST_API_KEY
152108
PARSE_SERVER_DOTNET_KEY
153109
PARSE_SERVER_JAVASCRIPT_KEY
154110
PARSE_SERVER_DOTNET_KEY
155-
PARSE_SERVER_MASTER_KEY // required
156111
PARSE_SERVER_FILE_KEY
157112
PARSE_SERVER_FACEBOOK_APP_IDS // string of comma separated list
158113

159114
```
160115

161-
162-
Alternatively, you can use the `PARSE_SERVER_OPTIONS` environment variable set to the JSON of your configuration (see Usage).
163-
164-
To start the server, just run `npm start`.
165-
166-
##### Global installation
167-
168-
You can install parse-server globally
169-
170-
`$ npm install -g parse-server`
171-
172-
Now you can just run `$ parse-server` from your command line.
173-
174-
175-
### Supported
176-
177-
* CRUD operations
178-
* Schema validation
179-
* Pointers
180-
* Users, including Facebook login and anonymous users
181-
* Files
182-
* Push Notifications - See the [wiki entry](https://github.com/ParsePlatform/parse-server/wiki/Push).
183-
* Installations
184-
* Sessions
185-
* Geopoints
186-
* Roles
187-
* Class-level Permissions (see below)
188-
189-
Parse server does not include a web-based dashboard, which is where class-level permissions have always been configured. If you migrate an app from Parse, you'll see the format for CLPs in the SCHEMA collection. There is also a `setPermissions` method on the `Schema` class, which you can see used in the unit-tests in `Schema.spec.js`
190-
You can also set up an app on Parse, providing the connection string for your mongo database, and continue to use the dashboard on Parse.com.
191-
192-
### Not supported
193-
194-
* `Parse.User.current()` or `Parse.Cloud.useMasterKey()` in cloud code. Instead of `Parse.User.current()` use `request.user` and instead of `Parse.Cloud.useMasterKey()` pass `useMasterKey: true` to each query. To make queries and writes as a specific user within Cloud Code, you need the user's session token, which is available in `request.user.getSessionToken()`.
195-
196116
## Contributing
197117

198118
We really want Parse to be yours, to see it grow and thrive in the open source community. Please see the [Contributing to Parse Server guide](CONTRIBUTING.md).

examples/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Parse Server + Express Sample Application
2+
3+
We have provided a basic Node.js application that uses the Parse Server module on Express and can be easily deployed using any of the following buttons:
4+
5+
<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"></a> <a title="Deploy to Heroku" href="https://heroku.com/deploy?template=https://github.com/parseplatform/parse-server-example" target="_blank"><img src="https://www.herokucdn.com/deploy/button.png"></a> <a title="Deploy to Azure" href="https://azuredeploy.net/?repository=https://github.com/parseplatform/parse-server-example" target="_blank"><img src="http://azuredeploy.net/deploybutton.png"></a>
6+
7+
You can find the sample application in the [parse-server-example](https://github.com/ParsePlatform/parse-server-example) repository along with additional deployment options.

0 commit comments

Comments
 (0)