Skip to content

Commit

Permalink
Merge pull request #3 from varianone/master
Browse files Browse the repository at this point in the history
fix missing import statement and environment variables get when running main
  • Loading branch information
rcarmo authored Nov 3, 2021
2 parents b3a7bc0 + d03324a commit c065ade
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import logging as log
from bottle import default_app, route, request, view, static_file, run

@route("/")
Expand All @@ -25,7 +26,7 @@ def static(path):

if __name__ == '__main__':
log.debug("Beginning run.")
HTTP_PORT = int(environ.get('PORT', 8000))
BIND_ADDRESS = environ.get('BIND_ADDRESS', '127.0.0.1')
DEBUG = 'true' == environ.get('DEBUG', 'false').lower()
HTTP_PORT = int(os.environ.get('PORT', 8000))
BIND_ADDRESS = os.environ.get('BIND_ADDRESS', '127.0.0.1')
DEBUG = 'true' == os.environ.get('DEBUG', 'false').lower()
run(host=BIND_ADDRESS, port=HTTP_PORT, debug=DEBUG)

0 comments on commit c065ade

Please sign in to comment.