title: how to import external library to nodejs
body: <p>I would like to know how can I import an external library to nodejs.
  For example I would like to have phanotmjs library (I know that arelady exist an npm to get phantomjs, but is only an example).</p>
  <p>I think that a way was to get the source file of library and include it into a module like that:</p>
  <pre><code>module.exports = function (name, cb) {
     //source code of library
  });
  </code></pre>
  <p>But I think it is a wrong way of doing it.</p>
  <p>How can I include an external library to nodejs project to use it inside the project with its functionality?</p>
  <p>Thanks</p>