title: How to start with WebTorrent?
body: <p>I have some idea for <a href="https://github.com/feross/webtorrent" rel="nofollow">WebTorrent</a>. I have some experience with JavaScript and jQuery, but I never use Node.js or Browserify. Could someone explain me how to use the following simple code?</p>
  
  <pre><code>var client = new WebTorrent()
  
  var torrentId = 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d'
  
  client.add(torrentId, function (torrent) {
    // Torrents can contain many files. Let's use the first.
    var file = torrent.files[0]
  
    // Display the file by adding it to the DOM. Supports video, audio, image, etc. files
    file.appendTo('body')
  })
  </code></pre>
  
  <p>Should I attach a <code>&lt;script src="webtorrent.min.js"&gt;&lt;/script&gt;</code> and convert the code from above by Browserify (<code>browserify app.js &gt; bundle.js</code>)? Or maybe I need to use <code>npm install webtorrent</code> and attach some Browserify code?</p>
  
  <p>After using the code <code>npm install webtorrent</code> and just doing <kbd>Ctrl + c</kbd> + <kbd>Ctrl + v</kbd>, this example from above in <code>&lt;script&gt;</code> tag showed up player. Magic :) But I do something in my VM and now Chrome say that the <code>require('webtorrent')</code> is not definied.</p>
  
  <p>It would be great if I could use WebTorrent as simple as jQuery.</p>