Skip to content

Commit

Permalink
Fix code typos
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTaelin committed Mar 4, 2017
1 parent 425dec0 commit f0a4901
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ swarm.upload(exampleDApp)

When you run that script, it outputs a hash. You can then use that hash to access the uploaded DApp, by either using a Swarm-enabled browser such as Mist, or through a gateway. That demo DApp is live and can be accessed:

- If your browser recognizes Swarm, [click here](bzz:/8587c8e716bfceea12a7306d85a8a8ccad5019020916eb5a21fa47a7f1826891).
- If your browser recognizes Swarm, [click here](bzz://379d2791624c3e3719bb28f7bfa362cc9c726ec06482b5800c8e3cefaf2b7bcf/).

- If you are in a conventional browser, [click here](http://swarm-gateways.net/bzz:/8587c8e716bfceea12a7306d85a8a8ccad5019020916eb5a21fa47a7f1826891/).
- If you are in a conventional browser, [click here](http://swarm-gateways.net/bzz:/379d2791624c3e3719bb28f7bfa362cc9c726ec06482b5800c8e3cefaf2b7bcf/).

## Running a local node

Expand Down
2 changes: 1 addition & 1 deletion examples/dapp_download_to_disk.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const swarm = require("./../swarm.js").at("http://swarm-gateways.net");
const path = require("path");

// The hash of the DApp we uploaded on the other example.
const exampleDAppHash = "8587c8e716bfceea12a7306d85a8a8ccad5019020916eb5a21fa47a7f1826891";
const exampleDAppHash = "379d2791624c3e3719bb28f7bfa362cc9c726ec06482b5800c8e3cefaf2b7bcf";
const targetDirPath = path.join(__dirname,"example_dapp");

swarm.download(exampleDAppHash, targetDirPath)
Expand Down
8 changes: 4 additions & 4 deletions examples/dapp_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
const swarm = require("./../swarm.js").at("http://swarm-gateways.net");

// The contents of index.html.
const indexHtml =
const indexHtml = new Buffer(
`<html>
<body>
<h3><img src="ethereum_icon.png"/> Swarm.js example DApp</h3>
<p><a href="foo/test_text_1.txt">Test #1</a></p>
<p><a href="foo/test_text_2.txt">Test #2</a></p>
</body>
</html>`;
</html>`);

// For binary data, we can just use a buffer.
// This is a 16x16 Ethereum icon png.
Expand All @@ -41,10 +41,10 @@ const ethereumIconPng = new Buffer([
0x57,0x23,0xc8,0x42,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82]);

// Some test .txt file.
const testText1 = "test text #1";
const testText1 = new Buffer("test text #1");

// Other test .txt file.
const testText2 = "test text #2";
const testText2 = new Buffer("test text #2");

// The DApp is just an object mapping routes to contents, which can be either
// strings or buffers. Mime types are inferred from the extension. You can also
Expand Down

0 comments on commit f0a4901

Please sign in to comment.