mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-03-16 01:03:06 +00:00
Tutorial: single-node operation
parent
ac44828aea
commit
c623c52221
24
Tutorial.md
Normal file
24
Tutorial.md
Normal file
@ -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 "<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>
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user