title: How to make local library available as a installed module on Node.js
body: <p>Have a look at Dredd, for example, it makes the library Hooks available when you are running a script with the <code>dredd</code>command.</p>
  
  <p><strong>Command line</strong></p>
  
  <pre><code>$ dredd [...] --hookfiles=./hooks.js
  </code></pre>
  
  <p><strong>hooks.js</strong></p>
  
  <pre><code>const hooks = require('hooks');
  ...
  </code></pre>
  
  <p>How does it work?</p>