Of course I could just put my static pages on some free web hosting place, but that misses the point in that I'd like to maintain my own JSON server. So my friends at work suggested using EC3 (Amazon) or App Engine (Google). Since EC3 seems to possess a 1-year expiration time of the freebie quota, I decided to go for GAE.
GAE provides a development kit that allows for local development and contains some upload scripts. But I wanted to do everything on my Chromebook Pixel which does not have a real shell (can't enable developer mode because it's a corporate laptop). So I looked around and came across codenvy.com, formerly eXo Cloud IDE, a free service that offers online coding and integration with many services, amongst which GAE. Cloud 9, another popular online dev platform, does not seem to offer that integration.
Here are the things I needed to adapt in order to make it work:
- Write a configuration file (app.yaml) that specifies the handlers, i.e. what to do when a certain URL is requested. In my application /json.* URLs are handled by a python script whereas all other URLs are just served.
- Adapt my python script to use the webapp2 server library instead of the native Python web server modules.
The final result is at
http://swisstaxvisualization.appspot.com/
No comments:
Post a Comment