You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
8
8
9
9
Parse Server works with the Express web application framework. It can be added to existing web applications, or run by itself.
10
10
11
-
Read the announcement blog post here: http://blog.parse.com/announcements/introducing-parse-server-and-the-database-migration-tool/
[](https://azuredeploy.net/?repository=https://github.com/parseplatform/parse-server-example)
17
-
<atitle="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"><imgsrc="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
+
<atitle="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"><imgsrc="http://d0.awsstatic.com/product-marketing/Elastic%20Beanstalk/deploy-to-aws.png"></a> <atitle="Deploy to Heroku"href="https://heroku.com/deploy?template=https://github.com/parseplatform/parse-server-example"target="_blank"><imgsrc="https://www.herokucdn.com/deploy/button.png"></a> <atitle="Deploy to Azure"href="https://azuredeploy.net/?repository=https://github.com/parseplatform/parse-server-example"target="_blank"><imgsrc="http://azuredeploy.net/deploybutton.png"></a>
16
+
17
+
### Parse Server + Express
18
18
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:
20
20
21
21
```js
22
22
var express =require('express');
@@ -29,7 +29,7 @@ var api = new ParseServer({
29
29
databaseURI:'mongodb://localhost:27017/dev',
30
30
cloud:'/home/myApp/cloud/main.js', // Provide an absolute path
31
31
appId:'myAppId',
32
-
masterKey:'', //Add your master key here. Keep it secret!
32
+
masterKey:'myMasterKey', // Keep this key secret!
33
33
fileKey:'optionalFileKey',
34
34
serverURL:'http://localhost:1337/parse'// Don't forget to change to https if needed
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
56
46
57
-
#### Basic options:
47
+
Configure Parse Server using [environment variables](#configuration). To start the server, just run `npm start`.
58
48
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
67
50
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`
78
52
79
-
parse-server supports 3rd party authentication with
53
+
Now you can just run `$ parse-server` from your command line.
80
54
81
-
* Twitter
82
-
* Meetup
83
-
* Linkedin
84
-
* Google
85
-
* Instagram
86
-
* Facebook
87
55
56
+
## Documentation
88
57
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.
90
59
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
105
61
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).
107
63
108
-
It is possible to leverage the OAuth support with any 3rd party authentication that you bring in.
64
+
### Configuration
109
65
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.
122
67
123
-
On this module, you need to implement and export those two functions `validateAuthData(authData, options) {} ` and `validateAppId(appIds, authData) {}`.
68
+
#### Basic options
124
69
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).
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.
131
82
132
-
#### Advanced options:
83
+
*`clientKey`
84
+
*`javascriptKey`
85
+
*`restAPIKey`
86
+
*`dotNetKey`
133
87
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
138
89
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).
140
95
141
-
#### Standalone usage
96
+
#### Using environment variables
142
97
143
-
You can configure the Parse Server with environment variables:
98
+
You may also configure the Parse Server using environment variables:
144
99
145
100
```js
146
101
PARSE_SERVER_DATABASE_URI
147
102
PARSE_SERVER_CLOUD_CODE_MAIN
148
103
PARSE_SERVER_COLLECTION_PREFIX
149
104
PARSE_SERVER_APPLICATION_ID// required
105
+
PARSE_SERVER_MASTER_KEY// required
150
106
PARSE_SERVER_CLIENT_KEY
151
107
PARSE_SERVER_REST_API_KEY
152
108
PARSE_SERVER_DOTNET_KEY
153
109
PARSE_SERVER_JAVASCRIPT_KEY
154
110
PARSE_SERVER_DOTNET_KEY
155
-
PARSE_SERVER_MASTER_KEY// required
156
111
PARSE_SERVER_FILE_KEY
157
112
PARSE_SERVER_FACEBOOK_APP_IDS// string of comma separated list
158
113
159
114
```
160
115
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
-
196
116
## Contributing
197
117
198
118
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).
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
+
<atitle="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"><imgsrc="http://d0.awsstatic.com/product-marketing/Elastic%20Beanstalk/deploy-to-aws.png"></a> <atitle="Deploy to Heroku"href="https://heroku.com/deploy?template=https://github.com/parseplatform/parse-server-example"target="_blank"><imgsrc="https://www.herokucdn.com/deploy/button.png"></a> <atitle="Deploy to Azure"href="https://azuredeploy.net/?repository=https://github.com/parseplatform/parse-server-example"target="_blank"><imgsrc="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