From fec4b9a1c2a5d29c26aaf86e09e7ac556ba77c60 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Tue, 9 Jun 2015 18:33:12 -0700 Subject: Add optional BCE_ADDR and BCE_PORT Flask overrides. --- README.md | 3 +++ run.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) 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'))) -- cgit v1.2.3