# Small example for IPFS in Browser

**URL:** <https://discuss.ipfs.tech/t/small-example-for-ipfs-in-browser/10045>\
**Category:** Ecosystem and Usage\
**Created:** [January 30, 2021, 10:47am UTC](https://discuss.ipfs.tech/t/small-example-for-ipfs-in-browser/10045 "2021-01-30T10:47:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FledgeXu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/fledgexu/32/4440_2.png) [@FledgeXu](https://discuss.ipfs.tech/u/FledgeXu)\
**Post date:** [January 30, 2021, 10:47am UTC](https://discuss.ipfs.tech/t/small-example-for-ipfs-in-browser/10045/1 "2021-01-30T10:47:39Z")

</div>

[Demo Link](https://ipfs-blog-demo.otakusaikou.com/)  
Basic idea here is boosting a ipfs node when you visit this site and this ipfs node will download a IPLD object from IPFS network and then render it.  
It’s just small example to test IPFS in browser. For now, IPFS in Browser seems to only can connect IPFS node which enable websocket(Not support DHT yet, Maybe we can use WebRTC to implement DHT?)  
[There is the source code](https://github.com/fledgeXu/ipfs-Blog-Demo/)

---

<div class="post-metadata">

**Author:** ![Kharaa](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/kharaa/32/4919_2.png) [@Kharaa](https://discuss.ipfs.tech/u/Kharaa)\
**Post date:** [January 30, 2021, 2:01pm UTC](https://discuss.ipfs.tech/t/small-example-for-ipfs-in-browser/10045/2 "2021-01-30T14:01:52Z")

</div>

Awesome work, i think the main problem for implementing most P2P applications in the web browser is the lack of uncomplicated ways to do P2P networking. As for implementing a DHT on top of WebRTC here’s a [paper](https://ipfs.io/ipfs/bafybeidnlbkos6mvotnxkspz4yltuhybqcovvjbqo2ahb3dwmboikcufoq) I found about that, it highlights the steps you need to go through to create a P2P WebRTC connection.

---

<div class="post-metadata">

**Author:** ![FledgeXu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/fledgexu/32/4440_2.png) [@FledgeXu](https://discuss.ipfs.tech/u/FledgeXu)\
**Post date:** [January 30, 2021, 4:18pm UTC](https://discuss.ipfs.tech/t/small-example-for-ipfs-in-browser/10045/3 "2021-01-30T16:18:26Z")

</div>

I did some research and found js-IPFS already supported WebRTC(maybe?)

> <https://github.com/ipfs/js-ipfs/blob/ipfs@0.49.1/examples/browser-exchange-files/public/app.js#L48>

---

<div class="post-metadata">

**Author:** ![Kharaa](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/kharaa/32/4919_2.png) [@Kharaa](https://discuss.ipfs.tech/u/Kharaa)\
**Post date:** [January 30, 2021, 4:20pm UTC](https://discuss.ipfs.tech/t/small-example-for-ipfs-in-browser/10045/4 "2021-01-30T16:20:11Z")

</div>

Yeah i’m looking into that right now actually, Ill post here if I find anything
