Skip to content

Commit

Permalink
README and onefile demo are now using section bootstrap shortcut.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Sep 5, 2019
1 parent 716df4a commit 6209743
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 1 addition & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,7 @@ Let's make ``uwsgicfg.py``. There we configure uWSGI using nice ``PythonSection`
on http://127.0.0.1:8000
"""
section = PythonSection(
wsgi_module='/home/idle/myapp/wsgi.py',
).networking.register_socket(
PythonSection.networking.sockets.http('127.0.0.1:8000'))
return section
return PythonSection.bootstrap('http://127.0.0.1:8000', wsgi_module='/home/idle/myapp/wsgi.py')
# Almost done. One more thing:
Expand Down
7 changes: 4 additions & 3 deletions demos/onefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def configure():

alias = 'app_%s' % (idx + 1)

section = PythonSection(
section = PythonSection. bootstrap(

'http://127.0.0.1:%s' % port,

# Automatically reload uWSGI if this file is changed.
touch_reload=FILE,

Expand All @@ -88,8 +91,6 @@ def configure():
# for this demo.
workers=1,

).networking.register_socket(
PythonSection.networking.sockets.http('127.0.0.1:%s' % port)
)

port += 1
Expand Down

0 comments on commit 6209743

Please sign in to comment.