summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2015-06-09 18:33:12 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2015-06-09 18:33:12 -0700
commitfec4b9a1c2a5d29c26aaf86e09e7ac556ba77c60 (patch)
tree6ec8b368748f395165387c31245ef3ff03a27eb7
parente554bc0fa594855f73091ef9ed345ff1f2e3aef4 (diff)
downloadrpcblockchainexplorer-master.tar.gz
rpcblockchainexplorer-master.zip
Add optional BCE_ADDR and BCE_PORT Flask overrides.HEADmaster
-rw-r--r--README.md3
-rw-r--r--run.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/README.md b/README.md
index b28c17c..7964b8e 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,9 @@ Optionally, rpcconnect (rpc listening address) and rpcport may be defined.
Notably, the documented recommended command line for alphad configures it to
listen on a nondefault port.
+The BCE_ADDR and BCE_PORT environment variables can be used to override the
+default http server address and port binding of 127.0.0.1:5000.
+
# license
BSD
diff --git a/run.py b/run.py
index 2d9c07e..437860e 100644
--- a/run.py
+++ b/run.py
@@ -1,3 +1,5 @@
+import os
+
from rpcblockchainexplorer.flaskapp import create_app
app = create_app()
-app.run(debug=True)
+app.run(debug=True, host=os.environ.get('BCE_ADDR','127.0.0.1'), port=int(os.environ.get('BCE_PORT','5000')))