ipfsd-node

0.2.13 • Public • Published

ipfsd-node

Travis branch npm David npm

install

npm i --save ipfsd-node

requirements

  • 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();
})();

Readme

Keywords

none

Package Sidebar

Install

npm i ipfsd-node

Weekly Downloads

0

Version

0.2.13

License

MIT

Unpacked Size

2.03 MB

Total Files

51

Last publish

Collaborators

  • vandeurenglenn