> npm install -g go-ipfs-sidecar
> ipfs version
> npm install go-ipfs-sidecar
> ./node_modules/.bin/ipfs
import { path } from 'go-ipfs-sidecar'
path().then(ipfsPath => console.log('go-ipfs is installed at', ipfsPath))
import { pathSync } from 'go-ipfs-sidecar'
console.log('go-ipfs is installed at', pathSync())
import { sidecarPath } from 'go-ipfs-sidecar'
sidecarPath().then(ipfsPath => console.log('go-ipfs is installed at', ipfsPath))
import { sidecarPathSync } from 'go-ipfs-sidecar'
console.log('go-ipfs is installed at', sidecarPathSync())
Downloaded archives are placed in OS-specific cache directory which can be customized by setting NPM_GO_IPFS_CACHE
in env.
Warning: the file bin/ipfs
is a placeholder, when downloading stuff, it gets replaced. so if you run node install.js
it will then be dirty in the git repo. Do not commit this file, as then you would be commiting a big binary and publishing it to npm. A pre-commit hook exists and should protect against this, but better safe than sorry.
Feel free to join in. All welcome. Open an issue!
Copyright for portions of this project are held by [Protocol Labs, Inc., 2021] as part of npm-go-ipfs
.
All other copyright for this project are help by [Jonas Kruckenberg, 2021].