-
-
Save slinkp/5016128 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Check out the tornado source. | |
Switch to the branch1.2. | |
Apply this patch: | |
diff --git a/website/website.py b/website/website.py | |
index 39b7aed..902be9a 100644 | |
--- a/website/website.py | |
+++ b/website/website.py | |
@@ -49,6 +49,7 @@ settings = { | |
"template_path": os.path.join(os.path.dirname(__file__), "templates"), | |
"xsrf_cookies": True, | |
"debug": os.environ.get("SERVER_SOFTWARE", "").startswith("Development/"), | |
+ 'static_path': os.path.join(os.path.dirname(__file__), 'static'), | |
} | |
application = tornado.wsgi.WSGIApplication([ | |
(r"/([a-z]*)", ContentHandler), | |
@@ -56,6 +57,7 @@ application = tornado.wsgi.WSGIApplication([ | |
dict(url="http://github.com/downloads/facebook/tornado/tornado-0.1.tar.gz")), | |
(r"/static/tornado-0.2.tar.gz", tornado.web.RedirectHandler, | |
dict(url="http://github.com/downloads/facebook/tornado/tornado-0.2.tar.gz")), | |
+ | |
], **settings) | |
@@ -65,4 +67,8 @@ def main(): | |
if __name__ == "__main__": | |
- main() | |
+ #main() | |
+ import wsgiref.simple_server | |
+ # There seem to be some hardcoded 8888 references. | |
+ httpd = wsgiref.simple_server.make_server('', 8888, application) | |
+ httpd.serve_forever() | |
Run the server: | |
$ cd website | |
$ python website.py | |
In another terminal, fetch the content like so: | |
$ wget -nc -r -l9 -p -nH --no-parent --convert-links | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment