ipfake

1.0.0 • Public • Published

ipfake

Fake IPFS for local testing environment.

Install

$ npm install ipfake

Usage

From javascript

const ipfake = require("ipfake");
 
async function testIpfake() {
  const hash = await ipfake.add("/rel/or/abs/path/to/file");
  // returns a base58 hash of the absolute file path
 
  const absolutePath = await ipfake.get(hash);
  // returns an absolute path to the file, given its hash
}

From command line

$ ipfake add /rel/or/abs/path/to/file
$ ipfake get hashOfAbsoluteFilePath

/ipfake/

    Package Sidebar

    Install

    npm i ipfake

    Weekly Downloads

    1

    Version

    1.0.0

    License

    GPL-3.0

    Unpacked Size

    37.3 kB

    Total Files

    5

    Last publish

    Collaborators

    • ssmolkin1