Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Clone ipfs daemon in node #921

Closed
Closed
@shortcircuit3

Description

@shortcircuit3

I'm trying to recreated the command ipfs daemon in node.

const IPFS = require('ipfs')
// Create the IPFS node instance
const node = new IPFS({
  config: { // overload the default config
    API: { // API config for IPFS daemon
      HTTPHeaders: {
        "Access-Control-Allow-Origin": ["*"], // Origins from which to allow http requests
        "Access-Control-Allow-Methods": ["PUT", "GET", "POST"], // "PUT", "GET", "POST", "DELETE", etc.
        "Access-Control-Allow-Credentials": ["true"] // "true" || "false"
      }
    }
  }
})

node.on('ready', () => {

})

But in the browser I''m getting fetch errors

request.js:132 POST http://localhost:5001/api/v0/add?stream-channels=true net::ERR_CONNECTION_REFUSED

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowkind/supportA question or request for supportstatus/readyReady to be worked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions