Skip to content

satazor/js-ipfs-http-response

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-ipfs-http-response

standard-readme js-standard-style

Creates an HTTP response from an IPFS Hash

Lead Maintainer

Vasco Santos.

Installation

npm install ipfs-http-response

Usage

This project consists on creating a HTTP response from an IPFS Hash. This response can be a file, a directory list view or the entry point of a web page.

const { getResponse } = require('ipfs-http-response')

getResponse(ipfsNode, ipfsPath)
  .then((result) => {
    ...
  })

This module also exports the used ipfs resolver, which should be used when the response needs to be customized.

const { resolver } = require('ipfs-http-response')

resolver.multihash(ipfsNode, ipfsPath)
  .then((result) => {
    ...
  })
const { resolver } = require('ipfs-http-response')

resolver.directory(node, path, multihash)
  .then((result) => {
    ...
  })

ipfs-http-response usage

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Groovy 1.0%