Powered By GitBook
nodejs-parse-server-on-appengine
Learn how to run a Node.js Parse server on the App Engine flexible environment.
Contributed by Google employees.
Tutorial for deploying a Parse Server to the App Engine flexible environment.
You can check out Node.js and Google Cloud to get an overview of Node.js itself and learn ways to run Node.js apps on Google Cloud.

Prerequisites

    1.
    Create a project in the Cloud Console.
    2.
    Enable billing for your project.
    3.
    Install the Cloud SDK.

Create a MongoDB database

There are multiple options for creating a new MongoDB database. For example:
    Create a Compute Engine virtual machine with MongoDB pre-installed.
    Use mLab to create a free MongoDB deployment on Google Cloud.

Download and run the app

    1.
    Clone the parse-server example app and change directory to it:
    1
    git clone https://github.com/parse-community/parse-server-example.git
    2
    cd parse-server-example
    Copied!
    2.
    Install dependencies:
    1
    npm install
    Copied!
    3.
    Run the app locally:
    1
    APP_ID=your-app-id DATABASE_URL=your-mongodb-uri MASTER_KEY=your-master-key npm start
    Copied!

Deploy the app

    1.
    Make sure your app.yaml file looks something like this (update the variables with your own values):
    1
    runtime: nodejs
    2
    env: flex
    3
    ​
    4
    env_variables:
    5
    # --REQUIRED--
    6
    DATABASE_URI: mongodb://localhost:27017/dev
    7
    APP_ID: YOUR_APP_ID
    8
    MASTER_KEY: YOUR_MASTER_KEY
    9
    SERVER_URL: https://YOUR_PROJECT_ID.appspot.com/parse
    10
    # --OPTIONAL--
    11
    # FILE_KEY: YOUR_FILE_KEY
    12
    # PARSE_MOUNT: /parse
    13
    # CLOUD_CODE_MAIN:
    Copied!
    2.
    Run the following command to deploy your app:
    1
    gcloud app deploy
    Copied!
    3.
    View the deployed app:
    1
    gcloud app browse
    Copied!
Last modified 6mo ago