title: How download file via ipfs using Nodejs?
body: <p>I am trying to implement IPFS in an application made with NodeJS. I can add file and get the CID, but if I try to download it with <code>ipfs get &lt;CID&gt;</code> it does not download anything. Any ideas what can be ?. I use this code to start an IPFS node:</p>
  
  <pre><code>const IPFS = require('ipfs');
  // Spawn your IPFS node \o/
  const node = new IPFS();
  
  node.on('ready', () =&gt; {
      node.id((err, id) =&gt; {
          if (err) {
              return console.log(err)
          }
          console.log(id)
      })
  
      let files = [
          {
              path: '/home/my/file.jpg',
              content: File.read('/home/my/file.jpg', null)
          }
      ]
      node.files.add(files, function (err, files) {
          if (err) {
              console.log(err);
          } else {
              console.log(files)
          }
      })
  })
  </code></pre>