Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Remove settings and configuration for BDB_NODE_API_PATH as the driver…
Browse files Browse the repository at this point in the history
… does this for us now
  • Loading branch information
sohkai committed Feb 17, 2017
1 parent 1768d3a commit 237b082
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion .env_template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ API_PORT=3000
# Settings for the BigchainDB node that the API server should connect to
BDB_NODE_HOST=
BDB_NODE_PORT=
BDB_NODE_API_PATH=

##### Docker settings #####
# Externally exposed port for accessing BigchainDB's API
Expand Down
13 changes: 3 additions & 10 deletions web/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
BigchainDBConfiguration = namedtuple('BigchainDBConfiguration', [
'hostname',
'port',
'api_path'
])


Expand All @@ -19,20 +18,14 @@
if not BDB_PORT:
BDB_PORT = '9984'

BDB_API_PATH = os.environ.get('BDB_NODE_API_PATH', None)
if not BDB_API_PATH:
BDB_API_PATH = 'api/v1'


def get_bigchaindb_configuration():
return BigchainDBConfiguration(BDB_HOST, BDB_PORT, BDB_API_PATH)
return BigchainDBConfiguration(BDB_HOST, BDB_PORT)


def get_bigchaindb_api_url():
hostname, port, api_path = get_bigchaindb_configuration()
return 'http://{hostname}:{port}/{api_path}'.format(hostname=hostname,
port=port,
api_path=api_path)
hostname, port = get_bigchaindb_configuration()
return 'http://{hostname}:{port}'.format(hostname=hostname, port=port)


def parse_model(required_fields):
Expand Down

0 comments on commit 237b082

Please sign in to comment.