-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
23 lines (19 loc) · 832 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding: utf-8 -*-
import tornado.httpserver
import tornado.ioloop
import tornado.web
from handlers import main
APP_SETTINGS = {'template_path': 'templates', 'debug': True,
'cookie_secret': 'some_secret', 'autoescape': None}
application = tornado.web.Application([
(r'/', main.Index),
(r'/initiate_requests/', main.InitiateRequests),
(r'/check_responses/', main.CheckResponses),
(r'/login', main.Login),
(r'/admin/', main.AdminIndex),
(r'/admin/url/(\d+)/', main.AdminUrlDetails),
(r'/static/(.*)', tornado.web.StaticFileHandler, {'path': 'static'})
], **APP_SETTINGS)
http_server = tornado.httpserver.HTTPServer(application)
http_server.listen(3333)
tornado.ioloop.IOLoop.current().start()