Skip to content

Instantly share code, notes, and snippets.

@eldondev
Last active December 23, 2015 18:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eldondev/6679931 to your computer and use it in GitHub Desktop.
Save eldondev/6679931 to your computer and use it in GitHub Desktop.
Tornado static file index.html
application = tornado.web.Application([
(r"/()$", tornado.web.StaticFileHandler, {'path':'static/index.html'}),
(r"/(.*)", tornado.web.StaticFileHandler, {'path':'static/'}),
])
@eldondev
Copy link
Author

This is just a silly way to serve up an index.html as the root of your static directory.

@MauroEldritch
Copy link

Thanks, nice code!
Helped me to figure out a solution myself 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment