1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-14 22:37:17 +00:00
test-tutorial-framework/solvable/src/demo/app.py
2018-03-25 16:34:31 +02:00

22 lines
734 B
Python

import sys
import tornado
import zmq
from tornado.ioloop import IOLoop
from sql_injection_fsm import SQLInjectionFSM
from tfw.networking.server.tfw_server import TFWServer
from tfw.config import TFWENV
from tfw.config.logs import logging
log = logging.getLogger(__name__)
if __name__ == '__main__':
server = TFWServer(SQLInjectionFSM)
server.listen(TFWENV.WEB_PORT)
log.debug('Python version: {}'.format(sys.version[:5]))
log.debug('Tornado version: {}'.format(tornado.version))
log.debug('ZeroMQ version: {}'.format(zmq.zmq_version()))
log.debug('PyZMQ version: {}'.format(zmq.pyzmq_version()))
log.info('Tornado application listening on port {}'.format(TFWENV.WEB_PORT))
IOLoop.instance().start()