1
0
mirror of https://github.com/avatao-content/test-tutorial-framework synced 2024-11-15 01:27:18 +00:00
test-tutorial-framework/solvable/src/demo/app.py

22 lines
734 B
Python
Raw Normal View History

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()