Skip to content

Commit 51e9c9e

Browse files
andrewcbancroftdrew-gross
authored andcommitted
Update README.md with additional headers and TOC (#294)
Added additional headers and reorganized README so that it's easier to follow from a local installation / deployment scenario perspective. Added a table of contents with "jump-to" links for easier navigation of the document.
1 parent 28cbd29 commit 51e9c9e

File tree

1 file changed

+66
-21
lines changed

1 file changed

+66
-21
lines changed

README.md

Lines changed: 66 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,26 @@
55

66
Parse Dashboard is a standalone dashboard for managing your Parse apps. You can use it to manage your [Parse Server](https://github.com/ParsePlatform/parse-server) apps and your apps that are running on [Parse.com](https://Parse.com).
77

8+
* [Getting Started](#getting-started)
9+
* [Local Installation](#local-installation)
10+
* [Configuring Parse Dashboard](#configuring-parse-dashboard)
11+
* [Managing Multiple Apps](#managing-multiple-apps)
12+
* [Other Configuration Options](#other-configuration-options)
13+
* [Deploying Parse Dashboard](#deploying-parse-dashboard)
14+
* [Preparing for Deployment](#preparing-for-deployment)
15+
* [Security Considerations](#security-considerations)
16+
* [Configuring Basic Authentication](#configuring-basic-authentication)
17+
* [Separating App Access Based on User Identity](#separating-app-access-based-on-user-identity)
18+
* [Run with Docker](#run-with-docker)
19+
* [Contributing](#contributing)
20+
821
# Getting Started
922

10-
[Node.js](https://nodejs.org) version >= 4.3 is required to run the dashboard. You also need to be using Parse Server version 2.1.4 or higher. Install the dashboard from `npm`.
23+
[Node.js](https://nodejs.org) version >= 4.3 is required to run the dashboard. You also need to be using Parse Server version 2.1.4 or higher.
24+
25+
# Local Installation
26+
27+
Install the dashboard from `npm`.
1128

1229
```
1330
npm install -g parse-dashboard
@@ -19,9 +36,14 @@ You can launch the dashboard for an app with a single command by supplying an ap
1936
parse-dashboard --appId yourAppId --masterKey yourMasterKey --serverURL "https://example.com/parse" --appName optionalName
2037
```
2138

22-
You can then visit the dashboard in your browser at http://localhost:4040. You may set the host, port and mount path by supplying the `--host`, `--port` and `--mountPath` options to parse-dashboard. You can use anything you want as the app name, or leave it out in which case the app ID will be used.
39+
You may set the host, port and mount path by supplying the `--host`, `--port` and `--mountPath` options to parse-dashboard. You can use anything you want as the app name, or leave it out in which case the app ID will be used.
40+
41+
After starting the dashboard, you can visit http://localhost:4040 in your browser:
42+
43+
![Parse Dashboard](.github/dash-shot.png)
2344

24-
If you want to manage multiple apps from the same dashboard, you can start the dashboard with a config file. For example, you could put your info into a file called `parse-dashboard-config.json` and then start the dashboard using `parse-dashboard --config parse-dashboard-config.json`. The file should match the following format:
45+
## Configuring Parse Dashboard
46+
You can also start the dashboard from the command line with a config file. To do this, create a new file called `parse-dashboard-config.json` inside your local Parse Dashboard directory hierarchy. The file should match the following format:
2547

2648
```json
2749
{
@@ -36,13 +58,19 @@ If you want to manage multiple apps from the same dashboard, you can start the d
3658
}
3759
```
3860

39-
You can also manage apps that on Parse.com from the same dashboard. In your config file, you will need to add the `restKey` and `javascriptKey` as well as the other paramaters, which you can find on `dashboard.parse.com`. Set the serverURL to `http://api.parse.com/1`:
61+
You can then start the dashboard using `parse-dashboard --config parse-dashboard-config.json`.
62+
63+
## Managing Multiple Apps
64+
65+
Managing multiple apps from the same dashboard is also possible. Simply add additional entries into the `parse-dashboard-config.json` file's `"apps"` array.
66+
67+
You can manage self-hosted [Parse Server](https://github.com/ParsePlatform/parse-server) apps, *and* apps that are hosted on [Parse.com](http://parse.com/) from the same dashboard. In your config file, you will need to add the `restKey` and `javascriptKey` as well as the other paramaters, which you can find on `dashboard.parse.com`. Set the serverURL to `http://api.parse.com/1`:
4068

4169
```json
4270
{
4371
"apps": [
4472
{
45-
"serverURL": "https://api.parse.com/1",
73+
"serverURL": "https://api.parse.com/1", // Hosted on Parse.com
4674
"appId": "myAppId",
4775
"masterKey": "myMasterKey",
4876
"javascriptKey": "myJavascriptKey",
@@ -51,7 +79,7 @@ You can also manage apps that on Parse.com from the same dashboard. In your conf
5179
"production": true
5280
},
5381
{
54-
"serverURL": "http://localhost:1337/parse",
82+
"serverURL": "http://localhost:1337/parse", // Self-hosted Parse Server
5583
"appId": "myAppId",
5684
"masterKey": "myMasterKey",
5785
"appName": "My Parse Server App"
@@ -60,7 +88,9 @@ You can also manage apps that on Parse.com from the same dashboard. In your conf
6088
}
6189
```
6290

63-
Parse Dashboard also supports adding an optional icon for each app, so you can identify them easier in the list. To do so, you *must* use the configuration file, define an `iconsFolder` in it, and define the `iconName` parameter for each app (including the extension). The path of the `iconsFolder` is relative to the configuration file. To visualize what it means, in the following example `icons` is a directory located under the same directory as the configuration file:
91+
## App Icon Configuration
92+
93+
Parse Dashboard supports adding an optional icon for each app, so you can identify them easier in the list. To do so, you *must* use the configuration file, define an `iconsFolder` in it, and define the `iconName` parameter for each app (including the extension). The path of the `iconsFolder` is relative to the configuration file. To visualize what it means, in the following example `icons` is a directory located under the same directory as the configuration file:
6494

6595
```json
6696
{
@@ -77,19 +107,25 @@ Parse Dashboard also supports adding an optional icon for each app, so you can i
77107
}
78108
```
79109

80-
![Parse Dashboard](.github/dash-shot.png)
110+
## Other Configuration Options
81111

82-
# Advanced Usage
112+
You can set `appNameForURL` in the config file for each app to control the url of your app within the dashboard. This can make it easier to use bookmarks or share links on your dashboard.
83113

84-
## Other options
114+
To change the app to production, simply set `production` to `true` in your config file. The default value is false if not specified.
85115

86-
You can set `appNameForURL` in the config file for each app to control the url of your app within the dashboard. This can make it easier to use bookmarks or share links on your dashboard. To change the app to production, simply set `production` to `true` in your config file. Defaults to false if not specified.
116+
# Deploying Parse Dashboard
87117

88-
## Deploying the dashboard
118+
## Preparing for Deployment
89119

90120
Make sure the server URLs for your apps can be accessed by your browser. If you are deploying the dashboard, then `localhost` urls will not work.
91121

92-
In order to securely deploy the dashboard without leaking your apps master key, you will need to use HTTPS and Basic Auth. You can do this by adding usernames and passwords for HTTP Basic Auth to your configuration file.
122+
## Security Considerations
123+
In order to securely deploy the dashboard without leaking your apps master key, you will need to use HTTPS and Basic Authentication.
124+
125+
The deployed dashboard detects if you are using a secure connection. If you are deploying the dashboard behind a load balancer or proxy that does early SSL termination, then the app won't be able to detect that the connection is secure. In this case, you can start the dashboard with the `--allowInsecureHTTP=1` option. You will then be responsible for ensureing that your proxy or load balancer only allows HTTPS.
126+
127+
### Configuring Basic Authentication
128+
You can configure your dashboard for Basic Authentication by adding usernames and passwords your `parse-dashboard-config.json` configuration file:
93129

94130
```json
95131
{
@@ -107,11 +143,10 @@ In order to securely deploy the dashboard without leaking your apps master key,
107143
}
108144
```
109145

110-
The deployed dashboard detects if you are using a secure connection. If you are deploying the dashboard behind a load balancer or proxy that does early SSL termination, then the app won't be able to detect that the connection is secure. In this case, you can start the dashboard with the `--allowInsecureHTTP=1` option. You will then be responsible for ensureing that your proxy or load balancer only allows HTTPS.
111-
112-
## Separating app access based on user identity
146+
### Separating App Access Based on User Identity
147+
If you have configured your dashboard to manage multiple applications, you can restrict the management of apps based on user identity.
113148

114-
If you want to restrict apps based on user identity, you can update your config file to match the following format:
149+
To do so, update your `parse-dashboard-config.json` configuration file to match the following format:
115150

116151
```json
117152
{
@@ -120,11 +155,21 @@ If you want to restrict apps based on user identity, you can update your config
120155
{
121156
"user":"user1",
122157
"pass":"pass1",
123-
"apps": [{"appId": "myAppId"}, {"appId": "myAppId"}]
124-
}
125-
]
158+
"apps": [{"appId1": "myAppId1"}, {"appId2": "myAppId2"}]
159+
},
160+
{
161+
"user":"user2",
162+
"pass":"pass2",
163+
"apps": [{"appId1": "myAppId1"}]
164+
} ]
126165
}
127166
```
167+
The effect of such a configuration is as follows:
168+
169+
When `user1` logs in, he/she will be able to manage `appId1` and `appId2` from the dashboard.
170+
171+
When *`user2`* logs in, he/she will only be able to manage *`appId1`* from the dashboard.
172+
128173

129174
## Run with Docker
130175

@@ -150,6 +195,6 @@ docker run -d -p 80:8080 -v host/path/to/config.json:/src/Parse-Dashboard/parse-
150195

151196
If you are not familiar with Docker, ``--port 8080`` will be passed in as argument to the entrypoint to form the full command ``npm start -- --port 8080``. The application will start at port 8080 inside the container and port ``8080`` will be mounted to port ``80`` on your host machine.
152197

153-
## Contributing
198+
# Contributing
154199

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

0 commit comments

Comments
 (0)