Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
Simple python tornado application
__author__ = 'Amal G Jose'
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
from tornado.options import define, options
define("port", default=8888, help="run on the user defined port", type=int)
class HelloWorldHandler(tornado.web.RequestHandler):
def get(self):
print "Someone called me"
self.write("Welcome to Tornado..!!")
if __name__ == "__main__":
app = tornado.web.Application(handlers=[(r"/", HelloWorldHandler)])
http_server = tornado.httpserver.HTTPServer(app)
print "Starting server"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment