log.info(u"Server port = %d.", settings.PORT) log.info(u"Server addr = %s.", settings.BIND_ADDRESS) log.info(u"Public path = %s.", settings.PUBLIC_PATH) # Set up the database db_init(settings.DATABASE_CONFIG) # Just log success log.info(u"Init OK & server running.") # IO Loop for websockets and the amqp stuff io_loop = ioloop.IOLoop.instance() # Set up the message queues mq = MessageQueue(io_loop) mq.connect() # SockJS interface sockClass = UtuputkiSock sockClass.mq = mq router = SockJSRouter(sockClass, '/sock', dict(mq=mq)) # Index and static handlers handlers = router.urls + [ (r'/video/(.*)$', web.StaticFileHandler, { 'path': settings.CACHE_DIR }), (r'/(.*)$', web.StaticFileHandler, { 'path': settings.PUBLIC_PATH, 'default_filename': 'index.html' }),
log.info(u"Server port = %d.", settings.PORT) log.info(u"Server addr = %s.", settings.BIND_ADDRESS) log.info(u"Public path = %s.", settings.PUBLIC_PATH) # Set up the database db_init(settings.DATABASE_CONFIG) # Just log success log.info(u"Init OK & server running.") # IO Loop for websockets and the amqp stuff io_loop = ioloop.IOLoop.instance() # Set up the message queues mq = MessageQueue(io_loop) mq.connect() # SockJS interface sockClass = UtuputkiSock sockClass.mq = mq router = SockJSRouter(sockClass, '/sock', dict(mq=mq)) # Index and static handlers handlers = router.urls + [ (r'/video/(.*)$', web.StaticFileHandler, { 'path': settings.CACHE_DIR}), (r'/(.*)$', web.StaticFileHandler, { 'path': settings.PUBLIC_PATH, 'default_filename': 'index.html'}), ] conf = {