Merge branch 'examples_index_filename' of https://github.com/jasondavies/d3 into jasondavies-examples_index_filename
This commit is contained in:
Коммит
286e3d2b06
|
@ -8,11 +8,11 @@ tornado.options.define("port", default=8888, type=int)
|
|||
|
||||
if __name__ == "__main__":
|
||||
tornado.options.parse_command_line()
|
||||
application = tornado.web.Application([], **{
|
||||
"static_path": ".",
|
||||
"static_url_prefix": "/"
|
||||
})
|
||||
application = tornado.web.Application([
|
||||
(r"/(.*)", tornado.web.StaticFileHandler,
|
||||
{"path": ".", "default_filename": "index.html"}),
|
||||
])
|
||||
http_server = tornado.httpserver.HTTPServer(application)
|
||||
http_server.listen(tornado.options.options.port)
|
||||
print "http://localhost:%d/examples/index.html" % tornado.options.options.port
|
||||
print "http://localhost:%d/examples/" % tornado.options.options.port
|
||||
tornado.ioloop.IOLoop.instance().start()
|
||||
|
|
Загрузка…
Ссылка в новой задаче