diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2021-11-26 14:22:25 +0100 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2021-11-26 14:22:25 +0100 |
commit | e1fe3943dcbc60da8cae733a6e66d385a35d5ffa (patch) | |
tree | d726599e520682caf7186fc8bd8281d1df99349e /src/db.py | |
parent | 0454f0353605886a0a3218c23b39060a05c6221d (diff) |
Pass -c to quickstart_test.sh and we will start CouchDB for you as well.
Diffstat (limited to 'src/db.py')
-rwxr-xr-x | src/db.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -32,8 +32,13 @@ class DictDB(): ' COUCHDB_USER and COUCHDB_PASSWORD must be set.') sys.exit(-1) + if 'COUCHDB_PORT' in os.environ: + couchdb_port = os.environ['COUCHDB_PORT'] + else: + couchdb_port = 5984 + self.server = couch.client.Server( - f"http://{self.username}:{self.password}@{self.hostname}:5984/") + f"http://{self.username}:{self.password}@{self.hostname}:{couchdb_port}/") try: self.couchdb = self.server.database(self.database) |