Use Google App Engine to serve static files

By Nethru Limited (www.nethru.com)

Get a free website hosting using Google App Engine

free website hosting google app engine
Google App Engine (GAE) is a cloud computing platform for web applications. However, you can just use it to serve your static files, such as js, css, html, images, etc. Somebody may think that it is an overkill to use GAE for this purpose, but it is not a bad idea because the service is backed by Google’s data center. If you are looking for free static web hosting service, and you expect the traffic will not be very high (< 1GB per day), GAE may be your choice.

Things you need:

  1. A mobile phone for verifying your Google account (required by GAE)
  2. Python 2.7 (download from Python web site)
  3. App Engine SDK (download from Google)

The steps

  1. Create an application in GAE (https://appengine.google.com), follow the instruction there, I won’t cover it here.
  2. Create a new folder in your local drive for the GAE application, this folder will contain all the files upload to GAE
  3. create a text file app.yaml in that folder with content
  4. [raw]
    application: your-app-id
    version: 1
    runtime: python27
    api_version: 1
    threadsafe: yes

    handlers:
    – url: /
    static_files: static/index.html
    upload: static/index.html

    – url: /
    static_dir: static
    [/raw]

  5. create a new folder “static”, then copy all the files you want to upload to server
  6. install Python 2.7 and App Engine SDK for Python
  7. execute Google App Engine Launcher from the App Engine SDK
  8. File->Add Existing Application, and choose your created application folder
  9. press Deploy, you will be asked for google email login info, just input the login you used to create the application in step 1
  10. after it has finished the upload, your site is ready!

Go to your-app-id.appspot.com to have a look on your new site.

Leave a Reply

Your email address will not be published. Required fields are marked *