title: What is the purpose of user.js file in generated node environment
body: <p>I installed a plugin to allow me to set up a node.js environment in visual studio. Here is a screen shot of the files it provided me with...</p>
  
  <p><a href="https://i.stack.imgur.com/Ps2To.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ps2To.png" alt="enter image description here"></a></p>
  
  <p>Under routes, I have two files, <code>index.js</code> renders the home page, but I am not sure what the purpose of the <code>users.js</code> file. It contains the following code...</p>
  
  <pre><code>/*
   * GET users listing.
   */
  
  exports.list = function (req, res) {
      res.send("respond with a resource");
  };
  </code></pre>
  
  <p>and it is called by the <code>app.js</code> file as so...</p>
  
  <pre><code>var user = require('./routes/user');
  ...
  app.get('/users', user.list);
  </code></pre>
  
  <p>Can anyone explain why the structure includes this file. In my previous node projects I simply ignored it, but I feel like it may come in handy.</p>