{"id":487,"date":"2008-06-15T11:36:29","date_gmt":"2008-06-15T15:36:29","guid":{"rendered":"http:\/\/www.dr-chuck.com\/wordpress\/?p=487"},"modified":"2011-12-17T12:26:29","modified_gmt":"2011-12-17T16:26:29","slug":"a-simple-home-page-on-google-app-engine","status":"publish","type":"post","link":"https:\/\/www.dr-chuck.com\/csev-blog\/2008\/06\/a-simple-home-page-on-google-app-engine\/","title":{"rendered":"A Simple Home Page on Google App Engine"},"content":{"rendered":"<p>\nI wanted to get a simple home page on Google App Engine &#8211; I may someday migrate a version of www.dr-chuck.com to Google App Engine because I am a firm believer in things that are free :)<\/p>\n<p>\nSo my new really light home page is <a href=http:\/\/dr-chuck.appspot.com\/>http:\/\/dr-chuck.appspot.com\/<\/a>.  For now it is just some static HTML with some links.<\/p>\n<p>\nBut I wanted to make it an expandable application so I made it do a simple template and use the pattern where the program becomes an application server.  So here is the code:<\/p>\n<p><!--more--><\/p>\n<pre>\n<b>cat app.yaml <\/b>\napplication: dr-chuck\nversion: 1\nruntime: python\napi_version: 1\nhandlers:\n- url: .*\nscript: index.py\n<b>cat index.py<\/b>\n#!\/usr\/bin\/env python\nimport os\nimport wsgiref.handlers\nfrom google.appengine.ext.webapp import template\nfrom google.appengine.ext import webapp\nclass MainHandler(webapp.RequestHandler):\ndef get(self):\npath = os.path.join(os.path.dirname(__file__), 'index.html')\nself.response.out.write(template.render(path, { }))\ndef main():\napplication = webapp.WSGIApplication([\n('\/', MainHandler)],\ndebug=True)\nwsgiref.handlers.CGIHandler().run(application)\nif __name__ == '__main__':\nmain()\n<b>cat index.html<\/b>\n&lt;h2&gt;Welcome to Dr. Chuck's Page&lt;\/h2&gt;\n&lt;p&gt;You probably are looking for\n&lt;a href=http:\/\/www.dr-chuck.com\/&gt;www.dr-chuck.com&lt;\/a&gt; -\nthat is where I keep my resume, photos, etc. &lt;\/p&gt;\n.....\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to get a simple home page on Google App Engine &#8211; I may someday migrate a version of www.dr-chuck.com to Google App Engine because I am a firm believer in things that are free :) So my new really light home page is http:\/\/dr-chuck.appspot.com\/. For now it is just some static HTML with [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-487","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/487","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/comments?post=487"}],"version-history":[{"count":1,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/487\/revisions"}],"predecessor-version":[{"id":2586,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/posts\/487\/revisions\/2586"}],"wp:attachment":[{"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/media?parent=487"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/categories?post=487"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dr-chuck.com\/csev-blog\/wp-json\/wp\/v2\/tags?post=487"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}