diff options
author | Kristofer Hallin <kristofer@sunet.se> | 2021-09-23 11:56:34 +0200 |
---|---|---|
committer | Kristofer Hallin <kristofer@sunet.se> | 2021-09-23 11:56:34 +0200 |
commit | 0398e77a809abcaf78c6f7d3e6064a5bee50be23 (patch) | |
tree | 04e66c666fee6f40762cc4586bba345557227765 /README.md | |
parent | 838d36e7cab2f11322d4c3c211407a73ebc712b9 (diff) |
Use CouchDB, this might break things.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -53,8 +53,20 @@ Install dependencies (Debian). sudo apt install python3 python3-pip python3-leveldb pip3 install falcon -Start the demo HTTP server. +Start CouchDB, make sure to give it a username and password: + cd docker + export COUCHDB_USER=couchdb + export COUCHDB_PASSWORD=insecure + docker-compose up -d + +Start the demo HTTP server. Here we should pass on a few environment +variables to let it know which CouchDB to use: + + export DB_NAME=test + export DB_HOSTNAME=localhost + export DB_USERNAME=couchdb + export DB_PASSWORD=insecure python3 src/wsgi.py Submit some data. @@ -83,3 +95,7 @@ Submit some data. Get the same data back. curl -s -u sunet.se: http://localhost:8000/sc/v0/get | json_pp -json_opt utf8,pretty + +We might also filter the data: + + curl -s -u sunet.se: http://localhost:8000/sc/v0/get?port=111 | json_pp -json_opt utf8,pretty |