コード例 #1
0
ファイル: redis_server.py プロジェクト: idan/awesomestream
import os
import sys

# Munge the path a bit to make this work from directly within the examples dir
sys.path.insert(0, os.path.abspath(os.path.join(__file__, '..', '..')))

from awesomestream.backends import RedisBackend
from awesomestream.jsonrpc import create_app, run_server

if __name__ == '__main__':
    backend = RedisBackend(
        keys=['kind', 'user', 'game'],
        host='127.0.0.1',
        port=6379
    )
    app = create_app(backend)
    run_server(app, 8080)
コード例 #2
0
import os
import sys

# Munge the path a bit to make this work from directly within the examples dir
sys.path.insert(0, os.path.abspath(os.path.join(__file__, '..', '..')))

from awesomestream.backends import RedisBackend
from awesomestream.jsonrpc import create_app, run_server

if __name__ == '__main__':
    backend = RedisBackend(keys=['kind', 'user', 'game'],
                           host='127.0.0.1',
                           port=6379)
    app = create_app(backend)
    run_server(app, 9997)
コード例 #3
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
########NEW FILE########
__FILENAME__ = memory_server
import os
import sys

# Munge the path a bit to make this work from directly within the examples dir
sys.path.insert(0, os.path.abspath(os.path.join(__file__, '..', '..')))

from awesomestream.backends import MemoryBackend
from awesomestream.jsonrpc import create_app, run_server

if __name__ == '__main__':
    backend = MemoryBackend(keys=['kind', 'user', 'game'])
    app = create_app(backend)
    run_server(app, 9997)
########NEW FILE########
__FILENAME__ = redis_server
import os
import sys

# Munge the path a bit to make this work from directly within the examples dir
sys.path.insert(0, os.path.abspath(os.path.join(__file__, '..', '..')))

from awesomestream.backends import RedisBackend
from awesomestream.jsonrpc import create_app, run_server

if __name__ == '__main__':
    backend = RedisBackend(
        keys=['kind', 'user', 'game'],
        host='127.0.0.1',