title: 'require' was used before it was defined
body: <p>I'm starting to study Node.js. I purchased the manual written by Marc Wandscheider.
  I downloaded the tools to use it and I also downloaded Brackets.</p>
  
  <p>I'm trying a sample script, but I get two errors that do not understand and that are not present in the guide.</p>
  
  <p>The first error tells me that:</p>
  
  <blockquote>
    <p>'require' was used before it was defined</p>
  </blockquote>
  
  <pre><code>C:\node&gt; node debug web.js
  &lt;Debugger listening on port 5858&gt;
  connecting ... ok
  break in C:\node\web.js: 1
     1 var http = require ("http");
     2
     3 process_request function (req, res) {
  debug&gt;
  </code></pre>
  
  <p>while the second (in Brackets):</p>
  
  <blockquote>
    <p>missing use strict statement</p>
  </blockquote>
  
  <p>I saw on the internet that I can add the line</p>
  
  <pre><code>"use strict";
  </code></pre>
  
  <p>But the guide does not use it - is it required?</p>
  
  <p>How can I fix these issues?</p>
  
  <p>entire code</p>
  
  <pre><code>var http = require("http");
  
  function process_request(req, res) {
  
      var body = 'Thanks for calling!';
      var content_length = body.length;
          res.writeHead(200, {
              'Content-Length': content_length,
              'Content-Type': 'text/plain'
          });
      res.end(body);
  }
  
  var s = http.createServer(process_request);
  s.listen(8080);
  </code></pre>