title: "require" is not defined error- javascript
body: <p>I get this error in the browser when I run my .html file</p>
  
  <pre><code>Uncaught ReferenceError: require is not defined 
  </code></pre>
  
  <p>My File_system.html is:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt; 
  &lt;html&gt; 
  &lt;head&gt; 
  &lt;title&gt;window.requestFileSystem problem&lt;/title&gt;
  
  &lt;script type="text/javascript" src="server.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  function onInitFs(fs) {
  console.log(fs);   
  console.log(fs.getDirectory());
  }
  
  function errorHandler(e) {
  var msg = '';
  console.log(e);
  
  switch (e.code) {
  case FileError.QUOTA_EXCEEDED_ERR:
    msg = 'QUOTA_EXCEEDED_ERR';
    break;
  case FileError.NOT_FOUND_ERR:
    msg = 'NOT_FOUND_ERR';
    break;
  case FileError.SECURITY_ERR:
    msg = 'SECURITY_ERR';
    break;
  case FileError.INVALID_MODIFICATION_ERR:
    msg = 'INVALID_MODIFICATION_ERR';
    break;
  case FileError.INVALID_STATE_ERR:
    msg = 'INVALID_STATE_ERR';
    break;
  default:
    msg = 'Unknown Error';
    break;
  };
  
  console.log('Error: ' + msg);
  }
  window.requestFileSystem  = window.requestFileSystem || window.webkitRequestFileSystem;
  window.requestFileSystem(window.PERSISTENT, 1024*1024,onInitFs,errorHandler);
  
  &lt;/script&gt; 
  &lt;/head&gt; 
  &lt;body&gt;
  &lt;/body&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>And my server.js file is:</p>
  
  <pre><code>var http = require('http');
  var fs = require('fs');
  var index = fs.readFileSync('File_system.html');
  
  http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end(index);
  }).listen(8080);
  </code></pre>
  
  <p>What is wrong with this? Please help</p>
  
  <p>I should be able to retrieve all the fs methods in the console and create a directory with tat. But I am stuck in this. 
  Or is there any way to directly run in browser?</p>