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
[](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
+
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
+
});
36
+
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
+
```
44
+
13
45
## Documentation
14
46
15
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.
@@ -20,10 +52,8 @@ If you're interested in developing for Parse Server, the [Development guide](htt
20
52
21
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).
22
54
23
-
24
55
---
25
56
26
-
27
57
#### Basic options:
28
58
29
59
* databaseURI (required) - The connection string for your database, i.e. `mongodb://user:[email protected]/dbname`
@@ -106,48 +136,8 @@ For more informations about custom auth please see the examples:
106
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))
107
137
* enableAnonymousUsers - Defaults to true. Set to false to disable anonymous users.
108
138
109
-
110
-
111
139
---
112
140
113
-
### Usage
114
-
115
-
You can create an instance of ParseServer, and mount it on a new or existing Express website:
116
-
117
-
```js
118
-
var express =require('express');
119
-
var ParseServer =require('parse-server').ParseServer;
120
-
121
-
var app =express();
122
-
123
-
var port =process.env.PORT||1337;
124
-
125
-
// Specify the connection string for your mongodb database
126
-
// and the location to your Parse cloud code
127
-
var api =newParseServer({
128
-
databaseURI:'mongodb://localhost:27017/dev',
129
-
cloud:'/home/myApp/cloud/main.js', // Provide an absolute path
130
-
appId:'myAppId',
131
-
masterKey:'', //Add your master key here. Keep it secret!
132
-
fileKey:'optionalFileKey',
133
-
serverURL:'http://localhost:'+ port +'/parse'// Don't forget to change to https if needed
134
-
});
135
-
136
-
// Serve the Parse API on the /parse URL prefix
137
-
app.use('/parse', api);
138
-
139
-
// Hello world
140
-
app.get('/', function(req, res) {
141
-
res.status(200).send('Express is running here.');
142
-
});
143
-
144
-
app.listen(port, function() {
145
-
console.log('parse-server-example running on port '+ port +'.');
146
-
});
147
-
148
-
```
149
-
150
-
151
141
#### Standalone usage
152
142
153
143
You can configure the Parse Server with environment variables:
@@ -169,8 +159,7 @@ PARSE_SERVER_FACEBOOK_APP_IDS // string of comma separated list
169
159
```
170
160
171
161
172
-
173
-
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).
0 commit comments