title: Is it possible to automatically install the required modules for a node.js script?
body: <p>Is it possible to automatically download the required modules for a node.js script? I'm wondering if it's possible to generate a list of required modules for a node.js script (like the one below), and install them automatically, instead of installing them manually, one-by-one (using npm).</p>
  
  <pre><code>#!/usr/bin/env node
  
  var DNode = require('dnode');
  var sys = require('sys');
  var fs = require('fs');
  var http = require('http');
  
  var html = fs.readFileSync(__dirname + '/web.html');
  var js = require('dnode/web').source();
  
  //the rest of this script is omitted.
  </code></pre>