Created
May 22, 2019 08:24
-
-
Save ityoung/6d942151426f56e8410fb200edf2bca6 to your computer and use it in GitHub Desktop.
An index.py example of Tornado
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
from handler import server | |
from libs.redis import MyRedis | |
async def init_redis(): | |
await MyRedis.redis() | |
if __name__ == '__main__': | |
server.bind(8080) | |
server.start() | |
ioloop = asyncio.get_event_loop() | |
ioloop.run_until_complete(init_redis()) | |
ioloop.run_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment