mirror of
https://github.com/logos-storage/logos-storage-js.git
synced 2026-01-02 21:43:10 +00:00
20 lines
373 B
JavaScript
20 lines
373 B
JavaScript
import { Codex } from "@codex-storage/sdk-js";
|
|
|
|
async function main() {
|
|
const codex = new Codex(process.env.CODEX_NODE_URL, {
|
|
auth: {
|
|
basic: btoa("admin:SuperSecret123"),
|
|
},
|
|
});
|
|
|
|
const data = codex.data;
|
|
|
|
const cid = process.env.CODEX_CID;
|
|
|
|
const result = await data.networkDownloadStream(cid);
|
|
|
|
console.info(await result.data.text());
|
|
}
|
|
|
|
main();
|