Getting Started with CLI

So you have installed glide and are all set for your first glide in the cloud.

The first run of glide usually takes long time because it downloads latest Google App Egnine SDK and other dependencies so please grab a coffee and relax. Next run onwards, glide would start almost immediately.

  1. Glide can create an empty project for you, just fire:

    $ glide --app hello-glide create
    

    It creates a directory for your project hello-glide

  2. cd into this directory

    $ cd hello-glide
    
  3. Fasten your seat-belts and fire up glide command

    $ glide
    
  4. Open up browser and go to http://localhost:8080

    Congrats! You are running glide locally on Google App Engine local dev server.

    Yes! no verbose config, nothing else. Your web content is being served.

Making changes

A Typical glide app looks like:

glide-project
|-- app
|   |-- _routes.groovy
|   `-- ....
|-- glide.groovy
|-- build.gradle

You can create .groovy / .gtpl file in app dir as well as keep regular .html / .css and .js stuff there.

Deploying on the Google App Engine

  1. To deploy this app on Google App Engine, first register your app and get an app id.

    Let's say you registered app with id your-glide-app-id

  2. Update the file called glide.groovy in the hello-glide directory with content:

    app {
        name = "your-glide-app-id"
        version ="1"
    }
    
  3. From your project dir (hello-glide) fire up

    glide deploy

    If this is first time you are deploying app on Google App Engine, you will be redirected to oauth2 token page. Copy and paste that token on command line.

  4. Open up browser and go to http://your-glide-app-id.appspot.com

    don't forget the change the 'your-glide-app-id' with actual app id.

    congrats, your app is live on the Google App Engine