Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2015-01-27 05:04:18 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-01-27 05:04:18 +0300
commitbb07d4db0e213611899d834b022e00936172557e (patch)
tree898c2ab31961ddfa2bc0c950e5bd44b4e1522529 /README.md
parenta3fdd9aafeb70f1fea545879131523b2906c3979 (diff)
JavaScript Standard Style
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4d24927..77277d7 100644
--- a/README.md
+++ b/README.md
@@ -111,8 +111,9 @@ standards (no plugins, just HTML5 and WebRTC)! It's easy to get started!
var WebTorrent = require('webtorrent')
var client = new WebTorrent()
+var magnetUri = '...'
-client.add(magnet_uri, function (torrent) {
+client.add(magnetUri, function (torrent) {
// Got torrent metadata!
console.log('Torrent info hash:', torrent.infoHash)
@@ -155,8 +156,9 @@ dragDrop('body', function (files) {
var WebTorrent = require('webtorrent')
var client = new WebTorrent()
+var magnetUri = '...'
-client.add(magnet_uri, function (torrent) {
+client.add(magnetUri, function (torrent) {
// Got torrent metadata!
console.log('Torrent info hash:', torrent.infoHash)
@@ -395,7 +397,9 @@ Here is a usage example:
```js
var client = new WebTorrent()
-client.add(magnet_uri, function (torrent) {
+var magnetUri = '...'
+
+client.add(magnetUri, function (torrent) {
// create HTTP server for this torrent
var server = torrent.createServer()
server.listen(port) // start the server listening to a port