# Serving a gateway from a js-ipfs web app

**URL:** <https://discuss.ipfs.tech/t/serving-a-gateway-from-a-js-ipfs-web-app/3222>\
**Category:** js-ipfs\
**Tags:** js-ipfs\
**Created:** [June 18, 2018, 11:09am UTC](https://discuss.ipfs.tech/t/serving-a-gateway-from-a-js-ipfs-web-app/3222 "2018-06-18T11:09:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![buzz](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@buzz](https://discuss.ipfs.tech/u/buzz)\
**Post date:** [June 18, 2018, 11:09am UTC](https://discuss.ipfs.tech/t/serving-a-gateway-from-a-js-ipfs-web-app/3222/1 "2018-06-18T11:09:15Z")

</div>

I’d like to write a small proof-of-concept web app that allows upload of files and makes them accessible to the global IPFS network. As I understand this should already be possible using js-ipfs and js-p2p-websocket-star. It was successfully done here: [https://github.com/ipfs/in-web-browsers/issues/49](https://github.com/ipfs/in-web-browsers/issues/49)

For me this example is not working. See here: [https://codepen.io/anon/pen/LrzBLa?editors=0010](https://codepen.io/anon/pen/LrzBLa?editors=0010)  
This example is adding a random string to js-ipfs and tries to load the resulting hash from the public gateway [ipfs.io](http://ipfs.io).

I look at ipfs.swarm.peers and can see that it actually connects to other peers (presumably only other browser peers?).

The gateway times out is not able to fetch the hash generated in the browser.

Does anyone got this working?

---

<div class="post-metadata">

**Author:** ![buzz](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@buzz](https://discuss.ipfs.tech/u/buzz)\
**Post date:** [June 18, 2018, 10:27pm UTC](https://discuss.ipfs.tech/t/serving-a-gateway-from-a-js-ipfs-web-app/3222/2 "2018-06-18T22:27:30Z")

</div>

Ok, my guess is this is related to [https://github.com/ipfs/js-ipfs/issues/1380](https://github.com/ipfs/js-ipfs/issues/1380) ?

---

<div class="post-metadata">

**Author:** ![buzz](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@buzz](https://discuss.ipfs.tech/u/buzz)\
**Post date:** [July 29, 2018, 9:47pm UTC](https://discuss.ipfs.tech/t/serving-a-gateway-from-a-js-ipfs-web-app/3222/3 "2018-07-29T21:47:03Z")

</div>

Seems to be resolved [https://github.com/ipfs/js-ipfs/issues/1380#issuecomment-408664817](https://github.com/ipfs/js-ipfs/issues/1380#issuecomment-408664817)

👍
