js-ipfs-http-client with webpack
Table of Contents
- Table of Contents
- About The Project
- Getting Started
- Want to hack on IPFS?
About The Project
- Read the docs
- Look into other examples to learn how to spawn an IPFS node in Node.js and in the Browser
- Consult the Core API docs to see what you can do with an IPFS node
- Visit https://dweb-primer.ipfs.io to learn about IPFS and the concepts that underpin it
- Head over to https://proto.school to take interactive tutorials that cover core IPFS APIs
- Check out https://docs.ipfs.io for tips, how-tos and more
- See https://blog.ipfs.io for news and more
- Need help? Please ask 'How do I?' questions on https://discuss.ipfs.io
Make sure you have installed all of the following prerequisites on your development machine:
- Git - Download & Install Git. OSX and Linux machines typically have this already installed.
- Node.js - Download & Install Node.js and the npm package manager.
- IPFS Daemon - Install js-ipfs or Download & Install IPFS Desktop that will run the go version of IPFS
Installation and Running example
> npm install > npm start
Now open your browser at
In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs-http-client with webpack, so that you can use it in your own web app!
As for any js-ipfs-http-client example, you need a running IPFS daemon, you learn how to do that here:
Note: If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-http-client#cors to learn how to do that.
A quick (and dirty) way to get it done is:
> ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"*\"]" > ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials "[\"true\"]"
You should see the following:
For more examples, please refer to the Documentation
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the IPFS Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature)
- Commit your Changes (
git commit -a -m 'feat: add some amazing feature')
- Push to the Branch (
git push origin feature/amazing-feature)
- Open a Pull Request
Want to hack on IPFS?
- Check out existing issues The issue list has many that are marked as 'help wanted' or 'difficulty:easy' which make great starting points for development, many of which can be tackled with no prior IPFS knowledge
- Look at the IPFS Roadmap This are the high priority items being worked on right now
- Perform code reviews More eyes will help a. speed the project along b. ensure quality, and c. reduce possible future bugs.
- Add tests. There can never be enough tests.
- Join the Weekly Core Implementations Call it's where everyone discusses what's going on with IPFS and what's next