Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: Describe when and why to use init: false
Browse files Browse the repository at this point in the history
Add some description to the "advanced options" documentation for the `IPFS` constructor detailing that `init: false` should really be used if a repo has already been initialized *by IPFS* and that simply calling `repoInstance.init()` doesn't init a repo with everything IPFS needs.

This partially handles #1245.

License: MIT
Signed-off-by: Rob Brackett <work@robbrackett.com>
  • Loading branch information
Mr0grog committed Mar 13, 2018
1 parent a32dce7 commit 7419c7e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ const repo = <IPFS Repo instance or repo path>
const node = new IPFS({
repo: repo,
init: true, // default
// init: false,
// init: false, // If you have already initialized the repo via `new IPFS()`.
// // Be careful using this on an IPFSRepo instance you have
// // initialized yourself -- the IPFS constructor initializes
// // repos with extra options, so calling `init()` on an
// // IPFSRepo may not always be compatible with IPFS.
// init: {
// bits: 1024 // size of the RSA key generated
// },
Expand Down

0 comments on commit 7419c7e

Please sign in to comment.