diff --git a/.ebextensions/app.config b/.ebextensions/app.config deleted file mode 100644 index a9dc92e..0000000 --- a/.ebextensions/app.config +++ /dev/null @@ -1,9 +0,0 @@ -option_settings: - aws:elasticbeanstalk:application:environment: - APP_ID: "ReplaceWithAppID" - MASTER_KEY: "ReplaceWithMasterKey" - APP_NAME: "ReplaceWithAppName" - NODE_ENV: "production" - SERVER_URL: "http://myappname.elasticbeanstalk.com/parse" - aws:elasticbeanstalk:container:nodejs: - NodeCommand: "npm start" diff --git a/Dockerfile b/Dockerfile index 3451ef7..60abb3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ RUN npm install ENV APP_ID setYourAppId ENV MASTER_KEY setYourMasterKey ENV SERVER_URL setYourParseServerUrl +ENV USERNAME setYourUsername +ENV PASSWORD setYourPassword # Optional # ENV APP_NAME setFriendlyAppName diff --git a/README.md b/README.md index 2e60e2d..9bc17ae 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,19 @@ Example project using the [parse-dashboard](https://github.com/ParsePlatform/par ### For Local Development -* Make sure you have at least Node 4.3. `node --version` -* Clone this repo and change directory to it. -* `npm install` -* Prerequisite: Ensure you have the parse-server installed and working - * Check the parse-server-example project for a quick start: https://github.com/ParsePlatform/parse-server-example -* Run the server with: npm start +- Make sure you have at least Node 4.3. `node --version` +- Clone this repo and change directory to it. +- `npm install` +- Prerequisite: Ensure you have the parse-server installed and working + - Check the parse-server-example project for a quick start: https://github.com/ParsePlatform/parse-server-example +- Run the server with: npm start ### Using it After starting the dashboard, you can visit http://localhost:4040 in your browser ### Usage + 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. 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: @@ -47,77 +48,23 @@ httpServer.listen(port, function() { }); ``` -* More configuration options can be found at: [Configuring Parse Dashboard](https://github.com/ParsePlatform/parse-dashboard#configuring-parse-dashboard) +- More configuration options can be found at: [Configuring Parse Dashboard](https://github.com/ParsePlatform/parse-dashboard#configuring-parse-dashboard) ### Getting Started With Heroku Development #### Using Heroku CLI -* Clone the repo and change directory to it -* Log in with the [Heroku Toolbelt](https://toolbelt.heroku.com/) and create an app: `heroku create` -* Deploy it with: `git push heroku master` -* Open the Heroku dashboard->settings page for your app at: https://dashboard.heroku.com/apps/``/settings -* Click on `Reveal Config Vars` button on the Heroku settings page -* Add the following `Config Vars`. Set them to the values for your `parse-server` -* APP_ID -* MASTER_KEY -* SERVER_URL -* APP_NAME +- Clone the repo and change directory to it +- Log in with the [Heroku Toolbelt](https://toolbelt.heroku.com/) and create an app: `heroku create` +- Deploy it with: `git push heroku master` +- Open the Heroku dashboard->settings page for your app at: https://dashboard.heroku.com/apps/``/settings +- Click on `Reveal Config Vars` button on the Heroku settings page +- Add the following `Config Vars`. Set them to the values for your `parse-server` +- APP_ID +- MASTER_KEY +- SERVER_URL +- APP_NAME #### With the Heroku Button [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) - - -### Getting Started With AWS Elastic Beanstalk - -#### With the Deploy to AWS Button - -* HELP WANTED - Need someone to help document this step - -#### Without It - -* Clone the repo and change directory to it -* 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` -* 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=` - -### Getting Started With Microsoft Azure App Service - -#### With the Deploy to Azure Button - -[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/) - -#### Without It - -A detailed tutorial is available here: -* HELP WANTED - Need someone to help document the step below correctly -[Azure welcomes Parse developers](https://azure.microsoft.com/en-us/blog/azure-welcomes-parse-developers/) - - -### Getting Started With Google App Engine - -1. Clone the repo and change directory to it -1. Create a project in the [Google Cloud Platform Console](https://console.cloud.google.com/). -1. [Enable billing](https://console.cloud.google.com/project/_/settings) for your project. -1. Install the [Google Cloud SDK](https://cloud.google.com/sdk/). -1. Modify `app.yaml` to update your environment variables. -1. Delete `Dockerfile` -1. Deploy it with `gcloud preview app deploy` - -A detailed tutorial is available here: -* HELP WANTED - Need someone to help document the step below correctly -[Running Parse Dashboard server on Google App Engine](https://cloud.google.com/nodejs/resources/frameworks/parse-server) - -### Getting Started With Scalingo - -#### With the Scalingo button - -[![Deploy to Scalingo](https://cdn.scalingo.com/deploy/button.svg)](https://my.scalingo.com/deploy) - -#### Without it - -* HELP WANTED - Need someone to help document the 3 steps below correctly - -* Clone the repo and change directory to it -* Log in with the [Scalingo CLI](http://cli.scalingo.com/) and create an app: `scalingo create my-parse-dashboard` -* Deploy it with: `git push scalingo master` diff --git a/app.json b/app.json index b7f125f..8777f11 100644 --- a/app.json +++ b/app.json @@ -1,8 +1,7 @@ { "name": "Parse Dashboard Example", "description": "An example Parse Dashboard server using the parse-dashboard module", - "repository": "https://github.com/cherukumilli/parse-dashboard-example", - "logo": "https://avatars2.githubusercontent.com/u/5217007?v=3&u=52845c74db401e9fc5df5673460f4d6835a6118a&s=200", + "repository": "https://github.com/louis70109/parse-dashboard-example", "keywords": ["node", "express", "parse", "dashboard"], "env": { "APP_ID": { @@ -23,7 +22,7 @@ }, "USERNAME": { "description": "The username of the account to log into the dashboard.", - "value": "stefanayala3266@gmail.com" + "value": "example@gmail.com" }, "PASSWORD": { "description": "The password of the account to log into your dashboard.", diff --git a/app.yaml b/app.yaml deleted file mode 100644 index e42f494..0000000 --- a/app.yaml +++ /dev/null @@ -1,9 +0,0 @@ -runtime: nodejs -vm: true - -env_variables: - # --REQUIRED-- - APP_ID: - MASTER_KEY: - # --OPTIONAL-- - # APP_NAME: diff --git a/azuredeploy.json b/azuredeploy.json deleted file mode 100644 index 3505a0c..0000000 --- a/azuredeploy.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "siteName": { - "type": "string" - }, - "hostingPlanName": { - "type": "string" - }, - "siteLocation": { - "type": "string" - }, - "sku": { - "type": "string", - "allowedValues": [ - "Free", - "Shared", - "Basic", - "Standard" - ], - "defaultValue": "Free" - }, - "workerSize": { - "type": "string", - "allowedValues": [ - "0", - "1", - "2" - ], - "defaultValue": "0" - }, - "parseAppId": { - "type": "string", - "minLength": 1, - "defaultValue": "myAppId" - }, - "parseMasterKey": { - "type": "string", - "minLength": 1, - "defaultValue": "myMasterKey" - }, - "parseServerUrl": { - "type": "string", - "minLength": 1, - "defaultValue": "http://yourappname.azure.com/parse" - }, - "repoURL": { - "type": "string", - "defaultValue": "https://github.com/cherukumilli/parse-dashboard-example.git", - "metadata": { - "description": "The URL for the GitHub repository that contains the project to deploy." - } - }, - "branch": { - "type": "string", - "defaultValue": "master", - "metadata": { - "description": "The branch of the GitHub repository to use." - } - } - }, - "resources": [ - { - "apiVersion": "2014-06-01", - "name": "[parameters('hostingPlanName')]", - "type": "Microsoft.Web/serverFarms", - "location": "[parameters('siteLocation')]", - "properties": { - "name": "[parameters('hostingPlanName')]", - "sku": "[parameters('sku')]", - "workerSize": "[parameters('workerSize')]", - "numberOfWorkers": 1 - } - }, - { - "apiVersion": "2014-06-01", - "name": "[parameters('siteName')]", - "type": "Microsoft.Web/Sites", - "location": "[parameters('siteLocation')]", - "dependsOn": [ - "[concat('Microsoft.Web/serverFarms/', parameters('hostingPlanName'))]" - ], - "tags": { - "[concat('hidden-related:', resourceGroup().id, '/providers/Microsoft.Web/serverfarms/', parameters('hostingPlanName'))]": "empty" - }, - "properties": { - "name": "[parameters('siteName')]", - "serverFarm": "[parameters('hostingPlanName')]" - }, - "resources": [ - { - "apiVersion": "2014-04-01", - "type": "config", - "name": "web", - "dependsOn": [ - "[concat('Microsoft.Web/Sites/', parameters('siteName'))]" - ], - "properties": { - "appSettings": [ - { - "name": "APP_ID", - "value": "[parameters('parseAppId')]" - }, - "name": "APP_NAME", - "value": "[parameters('parseAppName')]" - }, - { - "name": "MASTER_KEY", - "value": "[parameters('parseMasterKey')]" - }, - { - "name": "SERVER_URL", - "value": "[parameters('parseServerUrl')]" - }, - { - "name": "WEBSITE_NODE_DEFAULT_VERSION", - "value": "4.2.3" - } - ] - } - }, - { - "apiVersion": "2015-04-01", - "name": "web", - "type": "sourcecontrols", - "dependsOn": [ - "[resourceId('Microsoft.Web/Sites', parameters('siteName'))]" - ], - "properties": { - "RepoUrl": "[parameters('repoURL')]", - "branch": "[parameters('branch')]", - "IsManualIntegration": true - } - } - ] - } - ] -} diff --git a/index.js b/index.js index 7b38e08..8c20c0f 100644 --- a/index.js +++ b/index.js @@ -2,11 +2,11 @@ var express = require('express'); var ParseDashboard = require('parse-dashboard'); -var path = require('path'); let localParseServer = 'http://localhost:1337/parse'; // Heroku requires HTTPS. Please read the README file for details. let herokuParseServer = 'https://my-parse-dashboard.herokuapp.com/parse'; +let allowInsecureHTTP = true; var dashboard = new ParseDashboard({ apps: [ @@ -21,7 +21,7 @@ var dashboard = new ParseDashboard({ { user: process.env.USERNAME, pass: process.env.PASSWORD } ], trustProxy: 1 -}); +}, allowInsecureHTTP); var app = express(); app.enable('trust proxy'); diff --git a/package.json b/package.json index 40944d1..9a40f9e 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,12 @@ "main": "index.js", "repository": { "type": "git", - "url": "https://github.com/cherukumilli/parse-dashboard-example" + "url": "https://github.com/louis70109/parse-dashboard-example" }, "license": "MIT", "dependencies": { - "express": "^4.14.1", - "kerberos": "^0.0.x", - "parse-dashboard": "^1.0.24" + "express": "^4.18.1", + "parse-dashboard": "^4.1.4" }, "scripts": { "start": "node index.js" diff --git a/scalingo.json b/scalingo.json deleted file mode 100644 index 2feb6f3..0000000 --- a/scalingo.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "Parse Dashboard Example", - "description": "An example Parse Dashboard server using the parse-dashboard module", - "repository": "https://github.com/cherukumilli/parse-dashboard-example", - "logo": "https://avatars2.githubusercontent.com/u/5217007?v=3&u=52845c74db401e9fc5df5673460f4d6835a6118a&s=200", - "env": { - "APP_ID": { - "description": "A unique identifier for your app.", - "value": "" - }, - "MASTER_KEY": { - "description": "A key that overrides all permissions. Keep this secret.", - "value": "" - }, - "SERVER_URL": { - "description": "Parse Server URL.", - "value": "" - }, - "APP_NAME": { - "description": "Optional App Name", - "value": "" - } - } -}