November 2018
Intermediate to advanced
528 pages
13h 21m
English
The method for adding our site to Swarm is almost identical to the previous method. With Swarm running, as outlined earlier, we will use our existing dist/ directory, along with the --recursive flag.
In addition, we will pass a default path that specifies the file to render in the case of a request for a resource with an empty path, as follows:
$ swarm --defaultpath dist/index.html --recursive up dist/ 2a504aac8d02f7715bea19c6c19b5a2be8f7ab9442297b2b64bbb04736de9699
Having uploaded our files, the site can then be viewed through our local Swarm client using the generated hash, as follows: http://localhost:8500/bzz:/2a504aac8d02f7715bea19c6c19b5a2be8f7ab9442297b2b64bbb04736de9699/.
In the same way that we ...
Read now
Unlock full access