Connect Go IPFS CLI to my JS IPFS running application

Hi folks!

I’m trying to use: ipfs --api=/ip4/127.0.0.1/tcp/4002 where ipfs command is the go implementation of ipfs and the address /ip4/127.0.0.1/tcp/4002 is the address of my application that uses js-ipfs.

The outputs of my app are:

Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/ipfs/QmWviNKTYjpsC6yAq2XUQxYTpGyXbGSMeF5qJ2nQBEjJTk
Swarm listening on /ip4/127.0.0.1/tcp/4002/ipfs/QmWviNKTYjpsC6yAq2XUQxYTpGyXbGSMeF5qJ2nQBEjJTk
Swarm listening on /ip4/192.168.0.7/tcp/4002/ipfs/QmWviNKTYjpsC6yAq2XUQxYTpGyXbGSMeF5qJ2nQBEjJTk

But the go implementation of ipfs does not return anything when trying to connect to my app.

Thanks

Hm… 4002 does not look good, it seems to be a peering port, not an API port.
If you are using default config, your API is probably at port 5001.
Give it a try.

1 Like

you’re right lidel, thank you.