Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Tutorial: Static Website hosted on a local node #139

Closed
nuke-web3 opened this issue Jan 21, 2019 · 3 comments
Closed

New Tutorial: Static Website hosted on a local node #139

nuke-web3 opened this issue Jan 21, 2019 · 3 comments
Labels
content:IPFS new-tutorial Proposal for a new tutorial

Comments

@nuke-web3
Copy link
Contributor

I would love to have some tutorials that also gives users a reason to install an IPFS node and keep it alive on your machine. One of the easiest ways in my limited exposure to the space so far is self-hosting a static site on IPFS.

What networking protocol would this tutorial address?

  • IPFS + IPNS

What will the user know how to do after completing this tutorial?

  • Use skills learned so far to upload a static set of files for a website
  • Install a local node on your laptop/desktop and (optionally) set it to run on startup by default
  • Pin your website to your node and publish via IPNS

Describe the content of the tutorial.

  • Host a website on IPFS. Use put methods.
    • Use the tutorial flow + tools on the website to generate the static site
  • Use IPNS to make content dynamic. use publish methods.
  • Install IPFS on you machine (https://docs.ipfs.io/introduction/install/)
  • Pin static content on web tutorial to you local node.
    • Have user note that the web browser's node actually holds the content independently of the local node - so you have two nodes in the network that have the site now with separate peer IDs.
  • Publish dynamic content updates on local node via IPNS (optional)
  • Prompt at the begging and end pointing to see other tutorial sites that other proto.school users have made hosted on IPFS (IPLD explorer used here)

What potential challenges do you forsee in building this tutorial?

Not sure if IPNS is something we can implement on a tutorial live. Admittedly I have not looked at what js-IPFS is capible of in the context of the tutorials (yet).

Additional context (optional)

I would like this to follow a track that builds a model of a more robust IPFS site - where IPFS is the frontend, backend, and allows for a completely server-less dynamic website.

I am learning these tools myself as I am building this: https://github.com/Colorado-Community-Resources/CORE-Website/ and want to share what I learn along the way.

Would you like to build this tutorial yourself?

I am willing to help make the tutorial - but would LOVE to do this collaboratively. I know I will be slow on my own - I work better and faster with friends 👷‍♂️ 👷‍♀️

Feedback and brainstorming welcome!

@terichadbourne
Copy link
Member

Long term, I love the idea of helping users understand how to host websites on IPFS. I think it's a fabulous use case. However, I'm worried we might not be ready for this content at the moment. I'll jot a few notes and questions below, but I'm quite shaky on the technical details here so would love input from @mikeal and others.

js-ipfs vs go-ipfs
All of our ProtoSchool tutorials currently use js-ipfs so that they can easily run in the browser. To the best of my knowledge, if you want to host a full website (not just a file) on IPFS at the moment you need to use go-ipfs because js-ipfs doesn't yet work with IPNS & DHT. From the notes in the latest IPFS release, it sounds like the next release (0.35) may support IPNS over DHT, but I'm not entirely positive whether that means web hosting will become possible with js-ipfs.

command line
My impression is that the tutorial you've proposed would require the user to use the command line rather than be something they could explore in the browser, which makes it inherently less beginner-friendly. This isn't to say we'll never support tutorials that require the command line, but the structure isn't currently there for it.

missing prereqs
We should talk about what a user needs to know before they can attempt to host a website on IPFS. Ideally, we'd have that scaffolding in place on ProtoSchool before building a tutorial on this particular use case. For example, should there be a separate tutorial on mutability via IPNS? I presume the file API tutorials I'm working on would also be a prerequisite.

resources
Have you already come across this tutorial, @nukemandan, for your own exploration? https://docs.ipfs.io/guides/examples/websites/

@terichadbourne
Copy link
Member

Hey @nukemandan. There's been new content on web hosting added to the docs site. Curious to see what you think of it and whether it provides the type of content you were looking for. Because it's in the docs, it encourages people to do things on their computer that we can't test inside of ProtoSchool. First lesson in this section is here.

image

There's also a section on IPNS in a different spot here.

Note that we've opened issue #428 for a ProtoSchool tutorial focused on hosting that would be conceptual and avoid the complications of moving outside the browser to deliver the content. Please feel free to add any suggestions over there.

Perhaps the more hands-on version in the docs plus the conceptual one in #428 (linking to the docs tutorial in its resources page) would work together to accomplish what you were after?

@nuke-web3
Copy link
Contributor Author

Thanks @terichadbourne ! 🙇🏼
Yes, I think we can move over to #428 😁 - Excited to see this come about!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:IPFS new-tutorial Proposal for a new tutorial
Projects
None yet
Development

No branches or pull requests

2 participants