GithubHelp home page GithubHelp logo

ipns's Introduction

WeCanDO

IPFS Name Service Resolver

Are you tired of encountering the "504 Gateway Time-out" error from ipfs.io and dweb.link ?

To access your IPNS name, just use URL https://your-ipns-hash.ipns.surf

How to save and publish a webpage to IPFS and IPNS?

1. Start your IPFS daemon:

# ipfs daemon

2. Create an example.html file on your local disk.

3. Store your file on IPFS:

# ipfs add --cid-version 1 example.html

It will return a CID (hash) for this version of the file. You can access your file through the following URL: https://ipfs.io/ipfs/your-cid

Example output:
added bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm example.html

Where "bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm" is the CID of your file. You can use the following URLs to access your file:

https://ipfs.io/ipfs/bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm or https://bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm.ipfs.dweb.link

4. Publish your link to IPNS:

# ipfs name publish /ipfs/cid-of-your-file

It will return the hash of the IPNS record for your file. You can use this hash as a subdomain of ipns.surf

Example output:
Published to k51qzi5uqu5dipo4719isofxynwutbh3zdhhtqbfgqcp3sr4gxarf2vsniqtnq: /ipfs/bafkreibvqu2vgcvyjlrwrqxldelrcr3mug45xrv56qcjfhwans66pa4jlm

Where "k51qzi5uqu5dipo4719isofxynwutbh3zdhhtqbfgqcp3sr4gxarf2vsniqtnq" is the hash of your IPNS record for this file.

Example of the IPNS URL:

Afterwards, you can use this URL permanently on any web pages, messengers, or wherever you need this file.

5. To update your file, run the "add" command again to obtain a new CID:

# ipfs add example.html

6. Publish the new version of your file:

# ipfs name publish /ipfs/new-cid-of-your-file

7. The latest version of your file will always be accessible through the IPNS URL that you obtained in STEP 4.

Enjoy! ;)

ipns's People

Contributors

wecandodev avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.