For reference only, it can be bound to 0.0.0.0, and then it can be accessed from the external network. The IP is the host address
def main():
parse_options()
http_server = tornado.httpserver.HTTPServer(Application(),xheaders=True)
print "Server started on port "+str(options.port)
http_server.bind(int(options.port), "0.0.0.0")# listen local only "127.0.0.1"
http_server.start(1)
tornado.ioloop.IOLoop.instance().start()
if __name__ == '__main__':
main()
For reference only, it can be bound to 0.0.0.0, and then it can be accessed from the external network. The IP is the host address
Listen to 0.0.0.0
Listening 0.0.0.0
Application’s listen method can specify IP, such as