1 Tutorial
Bulat-Ziganshin edited this page 2022-09-16 12:13:45 +03:00

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 "<path to file>" "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/<Cid of the content>" --output <name of output file>