ipfsd-node
v0.2.13
Published
[](https://travis-ci.org/vandeurenglenn/ipfsd-node) [](https://www.npmjs.com/p
Readme
ipfsd-node
install
npm i --save ipfsd-noderequirements
- nodejs
>= 10.0.0
usage
default (earth)
import node from 'ipfsd-node';
(async () => {
const defaultNode = await node({ cleanup: true });
await defaultNode.start();
await defaultNode.stop();
})();custom
(async () => {
import { join } from 'path';
import node from 'ipfsd-node';
const options = {
repoPath: join(process.cwd(), 'testrepo'),
// repo-configs bootstrap, see https://github.com/crypto-io/repo-configs/tree/master/src/config/templates/bootstrap
// or array
bootstrap: 'leofcoin',
ports: {
swarm: 4002,
api: 5002,
// gateway: 9090
},
cleanup: true
}
const customNode = await node(options);
const { addresses } = await customNode.start();
await customNode.stop();
})();