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
Description
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