How to get Peer Information?

I was exercising with the js-ipfs (ipfs-http-client lib) for some use-case. I was unable to figure out to find a way to get the peer information who is hosting the specific file or directory. Do we have a way to achieve this?

To find a peer who is hosting the content for a CID, use ipfs.dht.findProvs, though the js-IPFS DHT implementation is incomplete, so if you’re running your http client against that, you’ll need to set up a go-ipfs node to actually perform the DHT query - see the docs on delegate routing.