require-from-cid
v1.0.9
Published
Require module from CID IPFS
Downloads
6
Maintainers
Readme
require-from-cid
Load module from Cid in Node.
Install
$ npm install require-from-cid
Conffig file .env
IPFS_HOST=""
IPFS_HOST="http://127.0.0.1:5001"
Usage
var requireFromCid = require('require-from-cid');
const hello = requireFromCid('QmXvbzLy1GtZLXrrKvGh2D5doXj8iS7AobysZwVjmF7yqd');
console.log(hello);
var client = require('require-from-cid/ipfs');
const { cid } = await client.add('Hello world!');
License
MIT © Do Vui