├── .ebextensions └── app.config ├── .gitignore ├── Dockerfile ├── README.md ├── app.json ├── app.yaml ├── azuredeploy.json ├── index.js ├── jsconfig.json ├── package.json └── scalingo.json /.ebextensions/app.config: -------------------------------------------------------------------------------- 1 | option_settings: 2 | aws:elasticbeanstalk:application:environment: 3 | APP_ID: "ReplaceWithAppID" 4 | MASTER_KEY: "ReplaceWithMasterKey" 5 | APP_NAME: "ReplaceWithAppName" 6 | NODE_ENV: "production" 7 | SERVER_URL: "http://myappname.elasticbeanstalk.com/parse" 8 | aws:elasticbeanstalk:container:nodejs: 9 | NodeCommand: "npm start" 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | 29 | # Emacs 30 | *~ 31 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest 2 | 3 | RUN mkdir parse-dashboard 4 | 5 | ADD . /parse-dashboard 6 | WORKDIR /parse-dashboard 7 | RUN npm install 8 | 9 | ENV APP_ID setYourAppId 10 | ENV MASTER_KEY setYourMasterKey 11 | ENV SERVER_URL setYourParseServerUrl 12 | 13 | # Optional 14 | # ENV APP_NAME setFriendlyAppName 15 | 16 | EXPOSE 4040 17 | 18 | CMD [ "npm", "start" ] 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # parse-dashboard-example 2 | 3 | Example project using the [parse-dashboard](https://github.com/ParsePlatform/parse-dashboard) module on Express. 4 | 5 | ### For Local Development 6 | 7 | * Make sure you have at least Node 4.3. `node --version` 8 | * Clone this repo and change directory to it. 9 | * `npm install` 10 | * Prerequisite: Ensure you have the parse-server installed and working 11 | * Check the parse-server-example project for a quick start: https://github.com/ParsePlatform/parse-server-example 12 | * Run the server with: npm start 13 | 14 | ### Using it 15 | 16 | After starting the dashboard, you can visit http://localhost:4040 in your browser 17 | 18 | ### Usage 19 | Parse Dashboard can be mounted on an Express app. Express is a web framework for Node.js. The fastest way to get started is to clone the [Parse Dashboard repo](https://github.com/ParsePlatform/parse-dashboard), which at its root contains a sample Express app with the Parse Dashboard API mounted. 20 | 21 | The constructor returns an API object that conforms to an [Express Middleware](http://expressjs.com/en/api.html#app.use). This object provides the REST endpoints for a Parse Dashboard app. Create an instance like so: 22 | 23 | ``` 24 | var express = require('express'); 25 | var ParseDashboard = require('parse-dashboard'); 26 | 27 | var dashboard = new ParseDashboard({ 28 | apps: [ 29 | { 30 | appId: process.env.APP_ID || 'myAppId', 31 | masterKey: process.env.MASTER_KEY || 'myMasterKey', 32 | serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse', 33 | appName: process.env.APP_NAME || 'MyApp', 34 | }, 35 | ], 36 | }); 37 | 38 | var app = express(); 39 | 40 | // make the Parse Dashboard available at / 41 | app.use('/', dashboard); 42 | 43 | var port = process.env.PORT || 4040; 44 | var httpServer = require('http').createServer(app); 45 | httpServer.listen(port, function() { 46 | console.log('parse-dashboard-example running on port ' + port + '.'); 47 | }); 48 | ``` 49 | 50 | * More configuration options can be found at: [Configuring Parse Dashboard](https://github.com/ParsePlatform/parse-dashboard#configuring-parse-dashboard) 51 | 52 | ### Getting Started With Heroku Development 53 | 54 | #### Using Heroku CLI 55 | 56 | * Clone the repo and change directory to it 57 | * Log in with the [Heroku Toolbelt](https://toolbelt.heroku.com/) and create an app: `heroku create` 58 | * Deploy it with: `git push heroku master` 59 | * Open the Heroku dashboard->settings page for your app at: https://dashboard.heroku.com/apps/``/settings 60 | * Click on `Reveal Config Vars` button on the Heroku settings page 61 | * Add the following `Config Vars`. Set them to the values for your `parse-server` 62 | * APP_ID 63 | * MASTER_KEY 64 | * SERVER_URL 65 | * APP_NAME 66 | 67 | #### With the Heroku Button 68 | 69 | [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) 70 | 71 | 72 | ### Getting Started With AWS Elastic Beanstalk 73 | 74 | #### With the Deploy to AWS Button 75 | 76 | * HELP WANTED - Need someone to help document this step 77 | 78 | #### Without It 79 | 80 | * Clone the repo and change directory to it 81 | * Log in with the [AWS Elastic Beanstalk CLI](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html), select a region, and create an app: `eb init` 82 | * Create an environment and pass in App ID, Master Key, serverURL and appName (optional): `eb create --envvars APP_ID=, MASTER_KEY=, SERVER_URL=, APP_NAME=` 83 | 84 | ### Getting Started With Microsoft Azure App Service 85 | 86 | #### With the Deploy to Azure Button 87 | 88 | [![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/) 89 | 90 | #### Without It 91 | 92 | A detailed tutorial is available here: 93 | * HELP WANTED - Need someone to help document the step below correctly 94 | [Azure welcomes Parse developers](https://azure.microsoft.com/en-us/blog/azure-welcomes-parse-developers/) 95 | 96 | 97 | ### Getting Started With Google App Engine 98 | 99 | 1. Clone the repo and change directory to it 100 | 1. Create a project in the [Google Cloud Platform Console](https://console.cloud.google.com/). 101 | 1. [Enable billing](https://console.cloud.google.com/project/_/settings) for your project. 102 | 1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/). 103 | 1. Modify `app.yaml` to update your environment variables. 104 | 1. Delete `Dockerfile` 105 | 1. Deploy it with `gcloud preview app deploy` 106 | 107 | A detailed tutorial is available here: 108 | * HELP WANTED - Need someone to help document the step below correctly 109 | [Running Parse Dashboard server on Google App Engine](https://cloud.google.com/nodejs/resources/frameworks/parse-server) 110 | 111 | ### Getting Started With Scalingo 112 | 113 | #### With the Scalingo button 114 | 115 | [![Deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy) 116 | 117 | #### Without it 118 | 119 | * HELP WANTED - Need someone to help document the 3 steps below correctly 120 | 121 | * Clone the repo and change directory to it 122 | * Log in with the [Scalingo CLI](http://cli.scalingo.com/) and create an app: `scalingo create my-parse-dashboard` 123 | * Deploy it with: `git push scalingo master` 124 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Parse Dashboard Example", 3 | "description": "An example Parse Dashboard server using the parse-dashboard module", 4 | "repository": "https://github.com/cherukumilli/parse-dashboard-example", 5 | "logo": "https://avatars2.githubusercontent.com/u/5217007?v=3&u=52845c74db401e9fc5df5673460f4d6835a6118a&s=200", 6 | "keywords": ["node", "express", "parse", "dashboard"], 7 | "env": { 8 | "APP_ID": { 9 | "description": "A unique identifier for your app.", 10 | "value": "myAppId" 11 | }, 12 | "MASTER_KEY": { 13 | "description": "A key that overrides all permissions. Keep this secret.", 14 | "value": "myMasterKey" 15 | }, 16 | "SERVER_URL": { 17 | "description": "URL to connect to your Heroku instance (update with your app's name + PARSE_MOUNT)", 18 | "value": "http://yourappname.herokuapp.com/parse" 19 | }, 20 | "APP_NAME": { 21 | "description": "The name of the app that will show up in the dashboard.", 22 | "value": "myAppName" 23 | }, 24 | "USERNAME": { 25 | "description": "The username of the account to log into the dashboard.", 26 | "value": "stefanayala3266@gmail.com" 27 | }, 28 | "PASSWORD": { 29 | "description": "The password of the account to log into your dashboard.", 30 | "value": "parse" 31 | } 32 | }, 33 | "image": "heroku/nodejs" 34 | } 35 | -------------------------------------------------------------------------------- /app.yaml: -------------------------------------------------------------------------------- 1 | runtime: nodejs 2 | vm: true 3 | 4 | env_variables: 5 | # --REQUIRED-- 6 | APP_ID: 7 | MASTER_KEY: 8 | # --OPTIONAL-- 9 | # APP_NAME: 10 | -------------------------------------------------------------------------------- /azuredeploy.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", 3 | "contentVersion": "1.0.0.0", 4 | "parameters": { 5 | "siteName": { 6 | "type": "string" 7 | }, 8 | "hostingPlanName": { 9 | "type": "string" 10 | }, 11 | "siteLocation": { 12 | "type": "string" 13 | }, 14 | "sku": { 15 | "type": "string", 16 | "allowedValues": [ 17 | "Free", 18 | "Shared", 19 | "Basic", 20 | "Standard" 21 | ], 22 | "defaultValue": "Free" 23 | }, 24 | "workerSize": { 25 | "type": "string", 26 | "allowedValues": [ 27 | "0", 28 | "1", 29 | "2" 30 | ], 31 | "defaultValue": "0" 32 | }, 33 | "parseAppId": { 34 | "type": "string", 35 | "minLength": 1, 36 | "defaultValue": "myAppId" 37 | }, 38 | "parseMasterKey": { 39 | "type": "string", 40 | "minLength": 1, 41 | "defaultValue": "myMasterKey" 42 | }, 43 | "parseServerUrl": { 44 | "type": "string", 45 | "minLength": 1, 46 | "defaultValue": "http://yourappname.azure.com/parse" 47 | }, 48 | "repoURL": { 49 | "type": "string", 50 | "defaultValue": "https://github.com/cherukumilli/parse-dashboard-example.git", 51 | "metadata": { 52 | "description": "The URL for the GitHub repository that contains the project to deploy." 53 | } 54 | }, 55 | "branch": { 56 | "type": "string", 57 | "defaultValue": "master", 58 | "metadata": { 59 | "description": "The branch of the GitHub repository to use." 60 | } 61 | } 62 | }, 63 | "resources": [ 64 | { 65 | "apiVersion": "2014-06-01", 66 | "name": "[parameters('hostingPlanName')]", 67 | "type": "Microsoft.Web/serverFarms", 68 | "location": "[parameters('siteLocation')]", 69 | "properties": { 70 | "name": "[parameters('hostingPlanName')]", 71 | "sku": "[parameters('sku')]", 72 | "workerSize": "[parameters('workerSize')]", 73 | "numberOfWorkers": 1 74 | } 75 | }, 76 | { 77 | "apiVersion": "2014-06-01", 78 | "name": "[parameters('siteName')]", 79 | "type": "Microsoft.Web/Sites", 80 | "location": "[parameters('siteLocation')]", 81 | "dependsOn": [ 82 | "[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]" 83 | ], 84 | "tags": { 85 | "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" 86 | }, 87 | "properties": { 88 | "name": "[parameters('siteName')]", 89 | "serverFarm": "[parameters('hostingPlanName')]" 90 | }, 91 | "resources": [ 92 | { 93 | "apiVersion": "2014-04-01", 94 | "type": "config", 95 | "name": "web", 96 | "dependsOn": [ 97 | "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" 98 | ], 99 | "properties": { 100 | "appSettings": [ 101 | { 102 | "name": "APP_ID", 103 | "value": "[parameters('parseAppId')]" 104 | }, 105 | "name": "APP_NAME", 106 | "value": "[parameters('parseAppName')]" 107 | }, 108 | { 109 | "name": "MASTER_KEY", 110 | "value": "[parameters('parseMasterKey')]" 111 | }, 112 | { 113 | "name": "SERVER_URL", 114 | "value": "[parameters('parseServerUrl')]" 115 | }, 116 | { 117 | "name": "WEBSITE_NODE_DEFAULT_VERSION", 118 | "value": "4.2.3" 119 | } 120 | ] 121 | } 122 | }, 123 | { 124 | "apiVersion": "2015-04-01", 125 | "name": "web", 126 | "type": "sourcecontrols", 127 | "dependsOn": [ 128 | "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" 129 | ], 130 | "properties": { 131 | "RepoUrl": "[parameters('repoURL')]", 132 | "branch": "[parameters('branch')]", 133 | "IsManualIntegration": true 134 | } 135 | } 136 | ] 137 | } 138 | ] 139 | } 140 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | // Example express application adding the parse-dashboard module to expose Parse Dashboard compatible API routes. 2 | 3 | var express = require('express'); 4 | var ParseDashboard = require('parse-dashboard'); 5 | var path = require('path'); 6 | 7 | let localParseServer = 'http://localhost:1337/parse'; 8 | // Heroku requires HTTPS. Please read the README file for details. 9 | let herokuParseServer = 'https://my-parse-dashboard.herokuapp.com/parse'; 10 | 11 | var dashboard = new ParseDashboard({ 12 | apps: [ 13 | { 14 | appId: process.env.APP_ID || 'myAppId', 15 | masterKey: process.env.MASTER_KEY || 'myMasterKey', 16 | serverURL: process.env.SERVER_URL || herokuParseServer || localParseServer, 17 | appName: process.env.APP_NAME || 'MyApp', 18 | }, 19 | ], 20 | users: [ 21 | { user: process.env.USERNAME, pass: process.env.PASSWORD } 22 | ], 23 | trustProxy: 1 24 | }); 25 | 26 | var app = express(); 27 | app.enable('trust proxy'); 28 | 29 | // make the Parse Dashboard available at / 30 | app.use('/', dashboard); 31 | 32 | var port = process.env.PORT || 4040; 33 | var httpServer = require('http').createServer(app); 34 | httpServer.listen(port, function() { 35 | console.log('parse-dashboard-example running on port ' + port + '.'); 36 | }); 37 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs" 5 | } 6 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parse-dashboard-example", 3 | "version": "1.0.2", 4 | "description": "An example Parse Dashboard server using the parse-dashboard module", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/cherukumilli/parse-dashboard-example" 9 | }, 10 | "license": "MIT", 11 | "dependencies": { 12 | "express": "^4.14.1", 13 | "kerberos": "^0.0.x", 14 | "parse-dashboard": "^1.0.24" 15 | }, 16 | "scripts": { 17 | "start": "node index.js" 18 | }, 19 | "engines": { 20 | "node": ">=4.3" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /scalingo.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Parse Dashboard Example", 3 | "description": "An example Parse Dashboard server using the parse-dashboard module", 4 | "repository": "https://github.com/cherukumilli/parse-dashboard-example", 5 | "logo": "https://avatars2.githubusercontent.com/u/5217007?v=3&u=52845c74db401e9fc5df5673460f4d6835a6118a&s=200", 6 | "env": { 7 | "APP_ID": { 8 | "description": "A unique identifier for your app.", 9 | "value": "" 10 | }, 11 | "MASTER_KEY": { 12 | "description": "A key that overrides all permissions. Keep this secret.", 13 | "value": "" 14 | }, 15 | "SERVER_URL": { 16 | "description": "Parse Server URL.", 17 | "value": "" 18 | }, 19 | "APP_NAME": { 20 | "description": "Optional App Name", 21 | "value": "" 22 | } 23 | } 24 | } 25 | --------------------------------------------------------------------------------