comparison service/shuttlepro/shuttleservice.py @ 936:b1eabeb7dc66

format Ignore-this: b956bc580c14c347ec202e72b4b26870 darcs-hash:20131012055217-312f9-3debd15affd6b52e56d4079291aed076b92640c1
author drewp <drewp@bigasterisk.com>
date Fri, 11 Oct 2013 22:52:17 -0700
parents 9bb3eac740f0
children
comparison
equal deleted inserted replaced
935:9bb3eac740f0 936:b1eabeb7dc66
83 from twisted.python import log as twlog 83 from twisted.python import log as twlog
84 twlog.startLogging(sys.stdout) 84 twlog.startLogging(sys.stdout)
85 port = 9103 85 port = 9103
86 poller = Poller() 86 poller = Poller()
87 reactor.listenTCP(port, cyclone.web.Application(handlers=[ 87 reactor.listenTCP(port, cyclone.web.Application(handlers=[
88 (r'/()', Index, {"path" : ".", # security hole- serves this dir too 88 (r'/()', Index, {"path" : ".", "default_filename" : "index.html"}),
89 "default_filename" : "index.html"}),
90 (r'/graph', GraphResource), 89 (r'/graph', GraphResource),
91 (r'/(.*)', cyclone.web.StaticFileHandler, 90 # serves this source code too
92 {"path" : ".", # security hole- serves this dir too 91 (r'/(.*)', cyclone.web.StaticFileHandler, {"path" : "."})
93 "default_filename" : "index.html"}),
94 ], poller=poller)) 92 ], poller=poller))
95 log.info("serving on %s" % port) 93 log.info("serving on %s" % port)
96 reactor.run() 94 reactor.run()