Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(config.Store): support store options to enable ipfs api & pubsub
this adds a new "Options" object to store configuration, which after recent upgrades to github.com/qri-io/cafs/ipfs, supports configuring qri's IPFS node to enable the IPFS HTTP API and optionally support for pubsub. To enable both, config.yaml's `store` should now look like this: ```yaml store type: "ipfs" options: api: true pubsub: true ``` if `store.options.api` is set to `true` it will use the IPFS config to figure out what address to bind the api to (in ipfs that defaults to localhost:5001). with both api and pubsub activated, it's possible to talk to the underlying pubsub api by supplying an `--api` flag to the go-ipfs binary (version 0.4.18 or higher). after running `qri connect`, in another terminal: `ipfs --api /ip4/127.0.0.1/tcp/5001/ pubsub sub foo` should hang. in a third terminal `ipfs --api /ip4/127.0.0.1/tcp/5001/ pubsub pub foo bar` will publish to the second terminal. fun! This `--api` flag trick should work for most ipfs commands. closes #162, closes #658
- Loading branch information