-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
41 lines (28 loc) · 903 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
import os
import os.path
import logging
import tornado.web
import tornado.wsgi
import wsgiref.handlers
from views import homepage
settings = {
# Application Settings
"title": u"rd108",
"cookie_secret": "12093b258de35ad7dce5b96a3bdbe9401c3b71c81fa8f0baa442d5f3",
"template_path": os.path.join(os.path.dirname(__file__), "templates"),
"static_path": os.path.join(os.path.dirname(__file__), "static"),
# Configuration
"debug": os.environ['SERVER_SOFTWARE'].startswith('Development'),
#"xsrf_cookies": True,
}
application = tornado.wsgi.WSGIApplication([
(r"/", homepage.Home),
(r"/schizo_robot", homepage.SchizoRobot),
(r"/test", homepage.Test),
(r'.*', homepage.PageNotFound)
], **settings)
def main():
wsgiref.handlers.CGIHandler().run(application)
if __name__ == "__main__":
main()