Steps to implement and hosting your website in google app engine for free

Hi, In this post i am going to explain simple steps to implement and hosting your website in google app engine for free. There are many hosting servers hostgator,godaddy … etc. But we have to pay amount them for hosting space.Google is providing a free hosting space with 1 GB daily bandwidth. It will be useful for static html pages. But it is doesn’t support for php,.net … We can implement mobile version of your websites using google appengine with free of cost. I too implemented a small app you can check this.
 

Steps to implement and hosting your website in Google App Engine for free by Anil Kumar Panigrahi

Steps to implement and hosting your website in Google App Engine for free by Anil Kumar Panigrahi

demo link for Steps to implement and hosting your website in Google App Engine for free by Anil Kumar Panigrahi download link for Steps to implement and hosting your website in Google App Engine for free by Anil Kumar Panigrahi

 
By following steps we can implement a website with google hosting space.

Step 1:

Login with your gmail account to https://appengine.google.com/

step1 : steps to implement and hosting your website in google app engine for free by Anil Kumar Panigrahi

steps to implement and hosting your website in google app engine for free | Anil Labs

Step 2:

If you are not registered already, it is asked for your mobile number with country code with dropdown option.By enter your number then google will send you a message “Google App Engine Code : xxxxxxx”. Activate your account with insert this code.

steps to implement and hosting your website in google app engine for free | Anil Labs

steps to implement and hosting your website in google app engine for free | Anil Labs

Step 3:

Create a application name and check this if it is avialable or not.

steps to implement and hosting your website in google app engine for free | Anil Labs

steps to implement and hosting your website in google app engine for free | Anil Labs

Step 4:

Download the below files. It is very easy to use.

Python
Google App Engine SDK for Python

Step 5:

We have to first install Python and then Google App Engine SDK for Python.

Step 6:

We can download this file extract the files to c:/python/engineapp/ and open app.yaml and change the app name “infoanillabs” to your identifier name.

Step 7:

Open Google App Engine and create a application at your c:/python/engineapp/

steps to implement and hosting your website in google app engine for free | Anil Labs

steps to implement and hosting your website in google app engine for free | Anil Labs

Step 8:

You can deply your application to goole by clicking the deploy button at Google App Engine SDK for Python. It will ask for google email and password. Your code will deploy to google.

steps to implement and hosting your website in google app engine for free | Anil Labs

steps to implement and hosting your website in google app engine for free | Anil Labs

Step 9:

Use html code in your app

In app.yaml

  handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css))
  static_files: \1
  upload: (.*\.(gif|png|jpg|ico|js|css))
 
- url: .*
  script: main.py

In main.py

# Copyright 2011 Anil Labs
# http://www.anil2u.info

from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
 
import os
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from google.appengine.ext.webapp import template
 
class MainHandler(webapp.RequestHandler):
  def get (self, q):
    if q is None:
      q = 'index.html'
 
    path = os.path.join (os.path.dirname (__file__), q)
    self.response.headers ['Content-Type'] = 'text/html'
    self.response.out.write (template.render (path, {}))
 
def main ():
  application = webapp.WSGIApplication ([('/(.*html)?', MainHandler)], debug=True)
  util.run_wsgi_app (application)
 
if __name__ == '__main__':
  main ()

In the html file you can write your own static files, css, images …

Step 10:

If want to use mobile comptable website. use below code in your html file

<meta content = "width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" name = "viewport" />

Source from 9lessons.info for step10

Check my app in the http://iphonetester.com/

Thank you.

Discussion 5 Comments

  1. Tanisha

    Hi anil,Thanks for sharing..i have a doubt.How to upload new files in existing google app engine application…

  2. Anil Kumar Panigrahi

    @ Tanisha , If want to append any files with existing app, Just add that file or modify the file in the development folder. Once commit the files to google app engine then only modified or new files only uploaded or updated and remaining will be same.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>