Skip to content

Commit

Permalink
Add static file serving :)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmptrluke committed Apr 2, 2015
1 parent ebc77cb commit cb7fc0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cloudbot/web/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio

from tornado import gen
from tornado.web import RequestHandler, Application, url
from tornado.web import RequestHandler, Application, StaticFileHandler, url
from tornado.platform.asyncio import AsyncIOMainLoop

from jinja2 import Environment, PackageLoader
Expand All @@ -14,7 +14,8 @@ def get_template_env():

def get_application():
app = Application([
url('/', TestHandler)
(r'/', TestHandler),
(r"/static/(.*)", StaticFileHandler, {"path": "./cloudbot/web/static"}),
])
return app

Expand Down

0 comments on commit cb7fc0c

Please sign in to comment.