Hi,
I was trying to use composedb. For that i need the ceramic node running. I run it but the code is unable to connect to it. When i open localhost:7007 on browser it connects without any issues, but from my express server i try to connect to it I get connection refused.
const did = new DID({
resolver: getResolver(),
provider: new Ed25519Provider(privateKey),
});
await did.authenticate();
console.log("authenticate");
// Replace by the URL of the Ceramic node you want to deploy the Models to
const ceramic = new CeramicClient("http://localhost:7007");
// An authenticated DID with admin access must be set on the Ceramic instance
ceramic.did = did;
console.log("Ceramic instance created");
// Replace by the path to the local encoded composite file
const composite = await readEncodedComposite(ceramic, "composite.json");
console.log("Composite read");
// Notify the Ceramic node to index the models present in the composite
await composite.startIndexingOn(ceramic);
I see logs till “Ceramic instance created” then it fails on the next line “readEncodedComposite”
I have composite.json file on the root directory
Last sanity check for me, if you use Create Ceramic App to create an app can it access your node (just use npx @ceramicnetwork/create-ceramic-app clone & choose the ComposeDB template. Please be sure to npm install before running npm run dev.