Deploy Web app to Google App Engine!

Deploy NodeJS App to Google App Engine.

  • Create a new project
    1. Navigate to Google Cloud Dashboard
    2. Click “New Project” Create New Project
    3. Give project a name, and click “Create” New Project Created
  • Create a skeleton NodeJS webapp
    1. create a skeleton NodeJS webapp (express) with the following file structure: NodeJS skeleton
    2. In package.json file, make sure to specify the node version Specify NodeJS version
    3. In package.json file, include the following for google cloud related testing Google cloud related tools
    4. In app.yaml file, specify the NodeJS version Specify NodeJS version in YAML
    5. An example app can be found at This Repo
    6. To get this app running in local ( assuming you have the correct NodeJS version installed),do yarn install, yarn start, and navigate to Localhost to see the result
  • Getting ready to deploy to Google App Engine
    1. If you are using a Mac, go to Google SDK to download the google cloud sdk Dowanload Google Cloud SDK
    2. In terminal, install the sdk by running: {LOCATION_OF_DOWNLOADED_SDK}/google-cloud-sdk/install.sh
    3. Restart the terminal to pick up the change
    4. cd into the NodeJS webapp directory, and do glcoud init to initialize the gcloud config
    5. Create a new configuration or chose existing configuration Create or choose gcloud configuration
    6. Choose an existing gcloud account Choose an existing gcloud account
  • Deploy app to Google App Engine
    1. Enter gcloud app deploy and choose a region Chooseing a deployment region
    2. confirm deployment summary Confirm deployment summary
    3. It will show deployment is in progress Deployment in progress
    4. It will finish deploying the app in some time. Based on the information provided, you can navigate to https://<app_project_id>.appspot.com to access the web app. Here is mine
Written on October 13, 2018