Skip to content

Latest commit

 

History

History
123 lines (84 loc) · 4.78 KB

README.md

File metadata and controls

123 lines (84 loc) · 4.78 KB

parse-dashboard-example

Example project using the parse-dashboard module on Express.

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
  • 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, 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. This object provides the REST endpoints for a Parse Dashboard app. Create an instance like so:

var express = require('express');
var ParseDashboard = require('parse-dashboard');

var dashboard = new ParseDashboard({
  apps: [
    {
      appId: process.env.APP_ID || 'myAppId',
      masterKey: process.env.MASTER_KEY || 'myMasterKey',
      serverURL: process.env.SERVER_URL || 'http://localhost:1337/parse',
      appName: process.env.APP_NAME || 'MyApp',
    },
  ],
});

var app = express();

// make the Parse Dashboard available at /
app.use('/', dashboard);

var port = process.env.PORT || 4040;
var httpServer = require('http').createServer(app);
httpServer.listen(port, function() {
  console.log('parse-dashboard-example running on port ' + port + '.');
});

Getting Started With Heroku Development

Using Heroku CLI

  • Clone the repo and change directory to it
  • Log in with the Heroku Toolbelt 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

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, 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=<replace with Parse app ID>, MASTER_KEY=<replace with Parse master key>, SERVER_URL=<replace with your parse server URL>, APP_NAME=<replace with an optional appname>

Getting Started With Microsoft Azure App Service

With the Deploy to Azure Button

Deploy to Azure

Without It

A detailed tutorial is available here:

Getting Started With Google App Engine

  1. Clone the repo and change directory to it
  2. Create a project in the Google Cloud Platform Console.
  3. Enable billing for your project.
  4. Install the Google Cloud SDK.
  5. Modify app.yaml to update your environment variables.
  6. Delete Dockerfile
  7. Deploy it with gcloud preview app deploy

A detailed tutorial is available here:

Getting Started With Scalingo

With the Scalingo button

Deploy to Scalingo

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 and create an app: scalingo create my-parse-dashboard

  • Deploy it with: git push scalingo master