6

Certain functionality of a DApp can be hosted on the blockchain as smart contracts. How about other resources such as HTML and JS files? Multiple places reference "Swarm" as the place to host these resources, but when you look at Swarm wiki, it's basically a list of TO-DOs. There are DApps out there right now. How are they hosted?

1
  • I have exactly the same question and I'm not clear yet where the HTML / JS files would live.
    – Flion
    Apr 28 at 9:47
0

This mostly depends on how you define "DApp".

Following the definition of Buterin, a DApp is an application that doesnt have any central components (simplified). So all data is essentially stored in smart contracts on the blockchain and/or using concepts like IFPS.

The app itself (UI code, business logic, etc) is then run (and stored) by every user.

2
  • 1
    that doesn't really answer the question fully. Where does the user get this business logic & UI code from? For a webapp they most likely go to a domain and download some js files. Where do those files live?
    – Flion
    Apr 28 at 9:46
  • I don't understand your problem with that answer: Any app/code/logic that is run on your device needs to be brought there in the one or the other way. That includes the UI files for a DApp. DEPENDING ON HOW YOU DEFINE "DAPP", this might be different here and there. According to Buterin's definition, all data/UI files need to be in said IPFS or similar. Other definitions might allow a more "traditional" way, where you have local installations (e.g. downloaded from a website or repository) that simply connect with the help of a smart contract. As I said it mostly depends on how you define DApp
    – Xenonite
    May 27 at 14:18
0

I just found one possible answer, which is to host the HTML & JS on IPFS as explained here in section 4 "Deploy the application online with IPFS" and then you can point the DNS settings of your domain to IPFS too

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.