Skip to content

Commit cb7fc0c

Browse files
committed
Add static file serving :)
1 parent ebc77cb commit cb7fc0c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cloudbot/web/main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import asyncio
22

33
from tornado import gen
4-
from tornado.web import RequestHandler, Application, url
4+
from tornado.web import RequestHandler, Application, StaticFileHandler, url
55
from tornado.platform.asyncio import AsyncIOMainLoop
66

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

1515
def get_application():
1616
app = Application([
17-
url('/', TestHandler)
17+
(r'/', TestHandler),
18+
(r"/static/(.*)", StaticFileHandler, {"path": "./cloudbot/web/static"}),
1819
])
1920
return app
2021

0 commit comments

Comments
 (0)