diff web/index.py @ 27:dbbd503119ba

Add some web server handling
author Matt Johnston <matt@ucc.asn.au>
date Tue, 12 Jun 2012 00:09:09 +0800
parents
children e3e0ed7758f9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/web/index.py	Tue Jun 12 00:09:09 2012 +0800
@@ -0,0 +1,25 @@
+#!/usr/bin/env python2.7
+
+import bottle
+from bottle import route, request
+
+@route('/update', method='post')
+def update():
+    return "Done"
+
+@route('/graph.png')
+def graph():
+    pass
+
+@route('/')
+def top():
+    return bottle.template('top', urlparams=request.query_string)
+
+def main():
+    bottle.debug(True)
+    bottle.run(port=9999, reloader=True)
+
+if __name__ == '__main__':
+    main()
+    
+