Skip to content

Instantly share code, notes, and snippets.

@hungbang
Last active October 29, 2018 04:57
Show Gist options
  • Save hungbang/f36c626301ea25f2f86feb05b0e1d581 to your computer and use it in GitHub Desktop.
Save hungbang/f36c626301ea25f2f86feb05b0e1d581 to your computer and use it in GitHub Desktop.

Deploy project to ipfs

  1. Start Ipfs daemon to create a node

ipfs daemon

  1. To get your peers that will share content

ipfs swarm peers

  1. To add your dist folder to the network. This will generate a long hash for you.

ipfs add -r dist/

You'll see like this:

  added QmQZsFrE61EQm7QikWBxRX1GLRx4sLevdH3ShTR14sYz2B dist/static/ckeditor/skins
  added QmcrL4BkiUruMkTZaur6esvsRUVXmwJ4RfMn2Ddt2WYTDE dist/static/ckeditor
  added QmaGhEcNmo1mwTVvJDtF3dvBwASN7vQoYGxQXcLPj28a4B dist/static
  added QmTSBEi5BXtCZw7krCr9mreSpw6WZuaGWnMpucasY1tt4j dist
  1. To publish, copy last hash and execute:

ipfs name publish QmTSBEi5BXtCZw7krCr9mreSpw6WZuaGWnMpucasY1tt4j

You'll get something like this:

Published to QmbHpf6y6hVQ3wzk3A5rV4cPhtJNbai69hsLU8ssbPdcCc: /ipfs/QmTSBEi5BXtCZw7krCr9mreSpw6WZuaGWnMpucasY1tt4j
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment