Skip to content

Commit

Permalink
Add setting for the listen address (#4)
Browse files Browse the repository at this point in the history
* Add setting for the listen address

Expose a setting to change the listen address.

Defaults to '0.0.0.0', which should be for Docker operation also.

Closes #3
  • Loading branch information
towolf authored and M-Mueller committed Jan 28, 2018
1 parent 2ed880e commit 8ae6dda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import settings

http_server = httpserver.HTTPServer(wsgi.WSGIContainer(app.app))
http_server.listen(settings.WEBSERVER_PORT)
http_server.listen(settings.WEBSERVER_PORT, address=settings.WEBSERVER_ADDRESS)
ioloop.IOLoop.instance().start()

# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
3 changes: 3 additions & 0 deletions settings.py.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
# Path to the database file.
DATABASE = 'polls.db'

# Address to listen on
WEBSERVER_ADDRESS = '0.0.0.0'

# Port of the webserver
WEBSERVER_PORT = 5000

Expand Down

0 comments on commit 8ae6dda

Please sign in to comment.