ipfs/distributions

Can only publish to an IPFS daemon running on localhost:5001

开放

#345 创建于 2021年5月14日

 (3 条评论) (0 个反应) (0 位负责人)Less (31 个派生)auto 404
P3dif/easyeffort/hourshelp wantedkind/enhancement

仓库指标

星标
 (49 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

We create an IPFS HTTP Client here https://github.com/ipfs/distributions/blob/7d79fddb8dee3fda74a5b0728da8478db1b2f97d/scripts/dist.js#L23 which per the examples uses the default local go-ipfs port https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#example.

It would be great if this could use the IPFS_PATH environment variable to attempt to locate the API file which will have a multiaddr in it and then pass that multiaddr into the HTTP client.

  1. Read environment variable
  2. Read API addr from file https://github.com/ipfs/go-ipfs-http-client/blob/3af36210f80fb86aae50da582b494ceddd64c3de/api.go#L70
  3. Convert multiaddr into IPv4/IPv6 URL and pass it into the client

It may even be worth upstreaming these few lines of code into the HTTP Client as an alternative construction option (WDYT @achingbrain)

贡献者指南