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
@@ -12,25 +10,50 @@ Parse Server works with the Express web application framework. It can be added t
12
10
13
11
Read the announcement blog post here: http://blog.parse.com/announcements/introducing-parse-server-and-the-database-migration-tool/
14
12
15
-
## Documentation
13
+
## Getting Started
16
14
17
-
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.
[](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>
18
18
19
-
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.
19
+
You can create an instance of ParseServer, and mount it on a new or existing Express website:
20
+
21
+
```js
22
+
var express =require('express');
23
+
var ParseServer =require('parse-server').ParseServer;
24
+
var app =express();
25
+
26
+
// Specify the connection string for your mongodb database
27
+
// and the location to your Parse cloud code
28
+
var api =newParseServer({
29
+
databaseURI:'mongodb://localhost:27017/dev',
30
+
cloud:'/home/myApp/cloud/main.js', // Provide an absolute path
31
+
appId:'myAppId',
32
+
masterKey:'', //Add your master key here. Keep it secret!
33
+
fileKey:'optionalFileKey',
34
+
serverURL:'http://localhost:1337/parse'// Don't forget to change to https if needed
35
+
});
20
36
21
-
### Example Project
37
+
// Serve the Parse API on the /parse URL prefix
38
+
app.use('/parse', api);
39
+
40
+
app.listen(1337, function() {
41
+
console.log('parse-server-example running on port 1337.');
42
+
});
43
+
```
22
44
23
-
Check out the [parse-server-example project](https://github.com/ParsePlatform/parse-server-example) repository for an example of a Node.js application that uses the parse-server module on Express.
45
+
## Documentation
24
46
25
-
### Migration Guide
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.
26
48
27
-
Migrate your existing Parse apps to your own Parse Server. 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).
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.
28
50
51
+
### Migration Guide
29
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).
30
54
31
55
---
32
56
33
-
34
57
#### Basic options:
35
58
36
59
* databaseURI (required) - The connection string for your database, i.e. `mongodb://user:pass@host.com/dbname`
@@ -112,45 +135,8 @@ For more informations about custom auth please see the examples:
112
135
* databaseAdapter (unfinished) - The backing store can be changed by creating an adapter class (see `DatabaseAdapter.js`)
113
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))
114
137
* enableAnonymousUsers - Defaults to true. Set to false to disable anonymous users.
115
-
---
116
-
117
-
### Usage
118
-
119
-
You can create an instance of ParseServer, and mount it on a new or existing Express website:
120
-
121
-
```js
122
-
var express =require('express');
123
-
var ParseServer =require('parse-server').ParseServer;
124
-
125
-
var app =express();
126
-
127
-
var port =process.env.PORT||1337;
128
-
129
-
// Specify the connection string for your mongodb database
130
-
// and the location to your Parse cloud code
131
-
var api =newParseServer({
132
-
databaseURI:'mongodb://localhost:27017/dev',
133
-
cloud:'/home/myApp/cloud/main.js', // Provide an absolute path
134
-
appId:'myAppId',
135
-
masterKey:'', //Add your master key here. Keep it secret!
136
-
fileKey:'optionalFileKey',
137
-
serverURL:'http://localhost:'+ port +'/parse'// Don't forget to change to https if needed
138
-
});
139
-
140
-
// Serve the Parse API on the /parse URL prefix
141
-
app.use('/parse', api);
142
-
143
-
// Hello world
144
-
app.get('/', function(req, res) {
145
-
res.status(200).send('Express is running here.');
146
-
});
147
-
148
-
app.listen(port, function() {
149
-
console.log('parse-server-example running on port '+ port +'.');
150
-
});
151
-
152
-
```
153
138
139
+
---
154
140
155
141
#### Standalone usage
156
142
@@ -173,8 +159,7 @@ PARSE_SERVER_FACEBOOK_APP_IDS // string of comma separated list
173
159
```
174
160
175
161
176
-
177
-
Alernatively, you can use the `PARSE_SERVER_OPTIONS` environment variable set to the JSON of your configuration (see Usage).
162
+
Alternatively, you can use the `PARSE_SERVER_OPTIONS` environment variable set to the JSON of your configuration (see Usage).
expect(body.error).toEqual('Invalid classname: _GlobalConfig, classnames can only have alphanumeric characters and _, and must start with an alpha character ');
678
+
done();
679
+
})
680
+
});
681
+
682
+
it('does not fail when deleting nonexistant collections',done=>{
683
+
request.del({
684
+
url: 'http://localhost:8378/1/schemas/Missing',
685
+
headers: masterKeyHeaders,
686
+
json: true,
687
+
},(error,response,body)=>{
688
+
expect(response.statusCode).toEqual(200);
689
+
expect(body).toEqual({});
690
+
done();
691
+
});
692
+
});
693
+
694
+
it('deletes collections including join tables',done=>{
0 commit comments