view 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 source

#!/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()