-
Notifications
You must be signed in to change notification settings - Fork 25
Tutorial
Bulat-Ziganshin edited this page Sep 16, 2022
·
1 revision
It's supposed to be moved into /Tutorial.md and then linked from /README.md
How to use Codex?
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>