A ~76KB example chat app that uses window.ipfs, provided by the IPFS Companion web extension
Demo: https://tableflip.github.io/ipfs-pubsub-chat-example/dist/
-
This app requires
window.ipfs
. Install the IPFS Companion web extension: -
You need to be using the embedded JS-IPFS node, click the extension icon in the top right of your browser and toggle the switch to "embedded"
-
Open the preferences and paste in the following to configure your JS-IPFS node to use pubsub:
{ "config": { "Addresses": { "Swarm": [ "/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star" ] } }, "EXPERIMENTAL": { "pubsub": true } }
-
Install dependencies
npm install
-
Build the app
npm run build
-
Start the app
npm start