summaryrefslogtreecommitdiff
path: root/server/server.py
blob: da9ea177e482412da69f32e696ba1fcaed1fb84d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import string
from time import time

import cherrypy
import uuid

class Root(object):
    @cherrypy.expose
    def index(self):
        return 'Sup?'

from buttonDispatcher import ButtonDispatcher

cherrypy.tree.mount(Root())
cherrypy.tree.mount(ButtonDispatcher(), '/button', {
    '/': {'request.dispatch': cherrypy.dispatch.MethodDispatcher()}
})

cherrypy.engine.start()
cherrypy.engine.block()