Created
January 20, 2023 17:35
-
-
Save rundel/e79ec14dda7130a3326757ee67ff97eb to your computer and use it in GitHub Desktop.
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 | |
import tornado.web | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Hello, world") | |
def make_app(): | |
return tornado.web.Application([ | |
(r"/", MainHandler), | |
]) | |
async def main(): | |
app = make_app() | |
app.listen(8888) | |
await asyncio.Event().wait() | |
if __name__ == "__main__": | |
asyncio.run(main()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment