Skip to content

Latest commit

 

History

History
 
 

browser-parceljs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Bundle js-ipfs with Parcel.js

In this example, you will find a boilerplate application that connects to IPFS using JS-IPFS and is bundled with Parcel.js, so that you can follow it for creating Parcel.js bundled js-ipfs DApps.

Before you start

  1. Start your IPFS daemon of choice e.g. ipfs daemon (optional if you do not want to serve the example over IPFS)
  2. Open a new terminal
  3. cd into this folder
  4. Run npm install

Running this example in development mode with auto-reloading

  1. npm start
  2. Open your browser at http://localhost:1234

You should see the following:

Build and add to IPFS

  1. Clear the contents of dist if this is not the first time you are building e.g. rm -r dist on a unix system
  2. npm run build
  3. The production build of the site is now in the dist folder
  4. Add the folder to ipfs using your IPFS client of choice e.g. ipfs add -r dist

The last hash output is the hash of the directory. This can be used to access this example served over IPFS and will be accessible by a public gateway:

https://ipfs.io/ipfs/<hash_of_directory>/