nouveau fichier: superTornado.py
This commit is contained in:
parent
187c98c575
commit
57330baf36
20
superTornado.py
Normal file
20
superTornado.py
Normal file
@ -0,0 +1,20 @@
|
||||
import tornado.httpserver
|
||||
import tornado.ioloop
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
def main(port = 80):
|
||||
ioloop = tornado.ioloop.IOLoop.instance()
|
||||
application = tornado.web.Application([
|
||||
(r"/get/(sysinfo|cpuinfo)", InfoHandler)
|
||||
])
|
||||
http_server = tornado.httpserver.HTTPServer(application)
|
||||
http_server.listen(port)
|
||||
try:
|
||||
ioloop.start()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user