summaryrefslogtreecommitdiff
path: root/server/server.py
blob: 5a16cdce26ecf09f6641fe7f822bcbbeb8c822a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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()