Add 102 tutorial for CID generation configurations and CID profiles#455
Add 102 tutorial for CID generation configurations and CID profiles#455bumblefudge wants to merge 8 commits into
Conversation
| "ipfs-unixfs": "^11.2.0", | ||
| "ipfs-unixfs-exporter": "^13.6.1", | ||
| "ipfs-unixfs-importer": "^15.3.1", | ||
| "libp2p": "^2.1.6", |
There was a problem hiding this comment.
No need to add libp2p and exporter explicitly
There was a problem hiding this comment.
Sorry. This is my bad. libp2p was already in here because we import it directly in the 301 example.
| const bigHtmlFile = createReadStream('./2600-h.htm') | ||
|
|
||
| // generate CID according to Helia defaults (~== kubo v1 profile) from bigHtmlFile: | ||
| const cidBigHTML = await fs.addFile( |
There was a problem hiding this comment.
You can simplify this by having helia download the file for you as I did in
https://github.com/ipfs-examples/helia-examples/pull/456/files#diff-15db2a7c59c6093dbf74da5c6c0132ad792799c35a93eabe589cf6cd00d1019dR65
There was a problem hiding this comment.
i thought having a local file would simplify the comparison to kubo, since i don't think the latter has a "from URL" option? this is neat, tho, maybe it makes sense to add it as a 5th example before the local-file version to show that it's the same CID between urlSource(url) and the local file curled from the same URL... i leave it to the tutorials' editor to decide!
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
|
(I'll incorporate the changes above before un-drafting, if i ever do!) |
|
No strong opinions on whether they gets merged into #465 or otherwise reworked stylistically, I just want there to be a stable github URL i can send people when they ask how to get the equivalent determinism of the kubo profiles in helia! |
Thanks to @achingbrain and @2color for getting me started on this!