title: Node 101: app.use ReferenceError [route] not defined
body: <p>I am new to Node/Express, and have a basic question about routing as I am getting the following error message:</p>
  
  <pre><code>app.use('/edu', edu);
                  ^
  ReferenceError: edu is not defined
  at Object.&lt;anonymous&gt; (/Users/ronitelman/Dropbox/happy/happy/app.js:29:17)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  at Module.load (module.js:355:32)
  at Function.Module._load (module.js:310:12)
  at Module.require (module.js:365:17)
  at require (module.js:384:17)
  at Object.&lt;anonymous&gt; (/Users/ronitelman/Dropbox/happy/happy/bin/www:7:11)
  at Module._compile (module.js:460:26)
  at Object.Module._extensions..js (module.js:478:10)
  </code></pre>
  
  <p>[nodemon] app crashed - waiting for file changes before starting...</p>
  
  <p>app.js:</p>
  
  <pre><code>app.use('/', routes);
  app.use('/users', users);
  app.use('/about', about);
  app.use('/edu', edu);
  </code></pre>
  
  <p>File structure:</p>
  
  <pre><code>&gt; root
    &gt; ...
    &gt; routes
      | about.js
      | edu.js
      | index.js
      | users.js
  </code></pre>
  
  <p>edu.js:</p>
  
  <pre><code>var express = require('express');
  var router = express.Router();
  
  router.get('/', function(req, res) {
    res.render('dashboard', { layout: 'layout_edu' });
  });
  
  module.exports = router;
  </code></pre>
  
  <p>Additionally, I wanted to know if I should use the 'extends layout' in my dashboard.jade file, or if I should define the layout in the route</p>
  
  <p>dashboard.jade</p>
  
  <pre><code>extends layout //- or   res.render('dashboard', { layout: 'layout_edu' }); ?
  
  block content
    include ./nav/nav_layout.jade
    .wrapper
      include ./home/home.jade
      include ./home/benefits.jade      
      include ./home/students.jade
      include ./home/teachers.jade    
      include ./home/admin.jade
      include ./home/analytics.jade                             
      include ./home/tech.jade
      include ./home/featured.jade
  </code></pre>