summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/hello_world
diff options
context:
space:
mode:
authorChris Shenton <chris@v-studios.com>2017-10-21 15:35:25 +0200
committerChris Shenton <chris@v-studios.com>2017-10-21 16:02:59 +0200
commitbcf79f0d2555236b8b70932d30fd76bd15591ba0 (patch)
treebe86cea64445647fe5e462a54164bbf06d4176bd /docs/quick_tutorial/hello_world
parent6b234227d5da6294c51d476225472f5370ba0af5 (diff)
downloadpyramid-bcf79f0d2555236b8b70932d30fd76bd15591ba0.tar.gz
pyramid-bcf79f0d2555236b8b70932d30fd76bd15591ba0.tar.bz2
pyramid-bcf79f0d2555236b8b70932d30fd76bd15591ba0.zip
Quick Tutorial: Replace wsgiref with waitress
In setup.py add waitress import. In development.ini use waitress. Adjust line number highlighting. Mention that we're using it early in the tutorial. Addresses #2926
Diffstat (limited to 'docs/quick_tutorial/hello_world')
-rw-r--r--docs/quick_tutorial/hello_world/app.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/docs/quick_tutorial/hello_world/app.py b/docs/quick_tutorial/hello_world/app.py
index d0351e251..ff0b950d3 100644
--- a/docs/quick_tutorial/hello_world/app.py
+++ b/docs/quick_tutorial/hello_world/app.py
@@ -1,4 +1,4 @@
-from wsgiref.simple_server import make_server
+from waitress import serve
from pyramid.config import Configurator
from pyramid.response import Response
@@ -13,5 +13,4 @@ if __name__ == '__main__':
config.add_route('hello', '/')
config.add_view(hello_world, route_name='hello')
app = config.make_wsgi_app()
- server = make_server('0.0.0.0', 6543, app)
- server.serve_forever()
+ serve(app, host='0.0.0.0', port=6543)