From 0398e77a809abcaf78c6f7d3e6064a5bee50be23 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Thu, 23 Sep 2021 11:56:34 +0200 Subject: Use CouchDB, this might break things. --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 1959bd1..c391971 100644 --- a/README.md +++ b/README.md @@ -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 -- cgit v1.1