跳到主要内容
ArcBlock Community

How do I transfer an already existing site onto a blocklet?

Darthyoda63
支持
openqa

I want to learn how to upload a site that has already been created and upload it to a blocklet. I want to do this so I can own my own data and to make it more seamless for me and my team

4 条回复

shijun2年前(edited)

z1fJS8SrqZZ8vaADKYoSK3NdQoBsUK4eXbc Can you provide a little more detail on your website, eg:

  • Is it a static build of a webapp or have backend code to read/write database?
  • Any external resources that your website relies on?
  • How would you like to configure the access control of your website?

Then we can provide a few steps on how to transform your website into a blocklet that can run in blocklet server.

Darthyoda632年前

There are multiple sites that I want to connect. I wanted to learn how to connect ANY website to a blocklet because I work with several small businesses in the US and want to help them learn and use Web 3.0 to their advantage. Especially because one site is heavily censored

Thank you for your patience

Darthyoda632年前

z1VV21NqNWkiadznN32ALkos5dQqQwnCMty

There are multiple sites that I want to connect. I wanted to learn how to connect ANY website to a blocklet because I work with several small businesses in the US and want to help them learn and use Web 3.0 to their advantage. Especially because one site is heavily censored and will not allow some webpages to open up

If you want an exact site. It is going to be israelunite.org

Thank you for your patience

shijun2年前

A few more questions to consider before turning your websites into blocklets:

  • If your blocklets are not for public usage: there are 2 ways to get blocklets into your blocklet server:
    • Host your blocklets on your own store, and then publish your blocklets to that store, and then connect your server to that store and consume the blocklets
    • Just bundle and deploy your blocklet to your server in your CI workflow with remote deploy feature of blocklet-server, there is also a GitHub action by our engineer and widely used in our blocklet CI workflow
  • If your blocklets are for public usage: you can apply for a developer account on our test store by providing your GitHub account, and then publish your blocklets to our official test store

Once you have decided how to distribute your blocklets, then let's consider steps to turn your websites into blocklets (you may also do this before addressing the distribution problem).

To move forward in a step-by-step manner, I suggest you continue in the makefollowing steps:

  • Try creating a brand new blocklet with the create-blocklet tool (the first section in the above doc), get a basic understanding of files that make up a blocklet, such as blocklet.yml, blocklet.md
  • Try turning your existing blocklet into a blocklet (the second section in the above doc), a few things to keep in mind:
    • Choose blocklet type carefully according to https://www.arcblock.io/docs/blocklet-developer/en/blockletyml#types
    • If your blocklet needs to listen to a port in the backend, please use process.env.BLOCKLET_PORT
    • If your blocklet needs to store data on local disk, please use env.dataDir from @blocklet/sdk/lib/config
    • Configure files field carefully to include everything that your blocklet needs when run in production mode

If any issues are encountered during the process, I am always here to help.

回复