20 lines
369 B
Markdown
Raw Normal View History

2025-03-26 10:18:17 +01:00
# Download example
2025-05-26 12:54:34 +02:00
Small example to show how to download a file in node with Codex.
2025-03-26 10:18:17 +01:00
## Install dependencies
```bash
npm install
```
2025-05-26 12:54:34 +02:00
## Run node
2025-03-26 10:18:17 +01:00
```bash
2025-05-26 12:54:34 +02:00
CODEX_CID=REPLACE_BY_YOUR_CID node index.js
2025-03-26 10:18:17 +01:00
```
The response will be displayed as text, so it is better to test with .txt files.
Note: You can define `CODEX_NODE_URL`, default value is "http://localhost:8080".