From c623c52221dc0448134e253b2f1298cb782ed08c Mon Sep 17 00:00:00 2001 From: Bulat-Ziganshin Date: Fri, 16 Sep 2022 12:13:45 +0300 Subject: [PATCH] Tutorial: single-node operation --- Tutorial.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Tutorial.md diff --git a/Tutorial.md b/Tutorial.md new file mode 100644 index 0000000..7d0c04a --- /dev/null +++ b/Tutorial.md @@ -0,0 +1,24 @@ +_It's supposed to be moved into /Tutorial.md and then linked from /README.md_ + +How to use Codex? + +### Single-node operation + +In a single-node setup you should first start Codex node (server). Once you have built the program (link to BUILDING.md), you can find the executable in the `build` subdirectory. Just run it in a separate window/console: + +``` +build/codex +``` + +Once the node started, you can upload files to it and download them back: + +Upload operation: +``` +curl -vvv -H "content-type: application/octet-stream" -H Expect: -T "" "127.0.0.1:8080/api/codex/v1/upload" -X POST +``` + +Curl prints CID of the file uploaded that should be used to download the file back: +``` +curl -vvv "127.0.0.1:8080/api/codex/v1/download/" --output +``` +