Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created June 25, 2020 10:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save velotiotech/b4d91554b739f2487bf6131ac65ec06d to your computer and use it in GitHub Desktop.
Save velotiotech/b4d91554b739f2487bf6131ac65ec06d to your computer and use it in GitHub Desktop.
Simple tornado http server
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
def make_app():
return tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
app = make_app()
app.listen(8888)
tornado.ioloop.IOLoop.current().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment