diff --git a/app.py b/app.py old mode 100644 new mode 100755 index 568d02b..8f079a1 --- a/app.py +++ b/app.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import bottle from bottle import get, post, static_file, request, route, template from bottle import SimpleTemplate @@ -75,9 +77,9 @@ SimpleTemplate.defaults['url'] = bottle.url -# Run bottle internal test server when invoked directly (in development). +# Run bottle internal server when invoked directly (mainly for development). if __name__ == '__main__': - bottle.run(host='0.0.0.0', port=8080) + bottle.run(**CONF['server']) # Run bottle in application mode (in production under uWSGI server). else: application = bottle.default_app() diff --git a/settings.ini b/settings.ini index 8662e4e..de06e08 100644 --- a/settings.ini +++ b/settings.ini @@ -5,3 +5,8 @@ host = localhost port = 389 base = ou=People,dc=example,dc=org + +[server] +server = auto +host = localhost +port = 8080