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 +``` +