mirror of
https://github.com/oxen-io/oxen-storage-server.git
synced 2023-12-13 21:00:26 +01:00
Storage server for Oxen Service Nodes
.vscode | ||
contrib | ||
crypto | ||
external | ||
httpserver | ||
pow | ||
storage | ||
unit_test | ||
utils | ||
.clang-format | ||
.gitignore | ||
LICENSE | ||
README.md |
loki-storage-server
Storage server for Loki Service Nodes
Requirements:
- Boost >= 1.66 (for boost.beast)
- OpenSSL >= 1.1.1a (for X25519 curves)
- sodium (for ed25119 to curve25519 conversion)
mkdir build
cd build
cmake ../httpserver -DBOOST_ROOT="path to boost" -DOPENSSL_ROOT_DIR="path to openssl"
cmake --build .
./httpserver 127.0.0.1 8080
(The paths for Boost and OpenSSL need only to be provided if not installed on the system)
Then using something like Postman (https://www.getpostman.com/) you can hit the API:
post data
HTTP POST http://127.0.0.1/store
body: "hello world"
headers:
- X-Loki-recipient: "mypubkey"
- X-Loki-ttl: "86400"
- X-Loki-timestamp: "1540860811000"
- X-Loki-pow-nonce: "xxxx..."
get data
HTTP GET http://127.0.0.1/retrieve
headers:
- X-Loki-recipient: "mypubkey"
- X-Loki-last-hash: "" (optional)
unit tests
mkdir build_test
cd build_test
cmake ../unit_test -DBOOST_ROOT="path to boost" -DOPENSSL_ROOT_DIR="path to openssl"
cmake --build .
./Test --log_level=all