Skip to content

Commit 02566f0

Browse files
committed
Merge pull request #494 from ParsePlatform/fosco.qs
Updated readme with deploy buttons
2 parents 4bdff73 + 605f83c commit 02566f0

File tree

1 file changed

+33
-44
lines changed

1 file changed

+33
-44
lines changed

README.md

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,38 @@ Parse Server works with the Express web application framework. It can be added t
1010

1111
Read the announcement blog post here: http://blog.parse.com/announcements/introducing-parse-server-and-the-database-migration-tool/
1212

13+
## Getting Started
14+
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>
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 = new ParseServer({
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+
1345
## Documentation
1446

1547
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
2052

2153
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).
2254

23-
2455
---
2556

26-
2757
#### Basic options:
2858

2959
* 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:
106136
* 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))
107137
* enableAnonymousUsers - Defaults to true. Set to false to disable anonymous users.
108138

109-
110-
111139
---
112140

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 = new ParseServer({
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-
151141
#### Standalone usage
152142

153143
You can configure the Parse Server with environment variables:
@@ -169,8 +159,7 @@ PARSE_SERVER_FACEBOOK_APP_IDS // string of comma separated list
169159
```
170160

171161

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).
174163

175164
To start the server, just run `npm start`.
176165

0 commit comments

Comments
 (0)