title: app.get is not working for base route
body: <p>I am an absolutely newby in node.js and I try to create a new project via this technology. I use express framework but on the start I have a little trouble. I have solved this trouble with workaround but I have a question for next behavior:
  My <strong>app.js</strong></p>
  
  <pre><code>var express = require('express')
    , routes = require('./routes/index')
    , routes = require('./routes/login');
  
  var app = module.exports = express.createServer(); 
  console.log(app.env);
  // Configuration
  
  app.configure(function(){
    app.set('views', __dirname + '/views');
    app.set('view engine', 'ejs');
    app.use(express.bodyParser());
    app.use(express.methodOverride());
    app.use(app.router);
    app.use(express.static(__dirname + '/public'));
  });
  
  
  app.configure('development', function(){
    app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
  });
  
  app.configure('production', function(){
    app.use(express.errorHandler());
  });
  
  // Routes
  
  app.use( function(req, res, next) {
      if (req.url == '/') {
          res.render('index', { title: 'Express!' })
      } else {
          next();
      }
  });
  //app.get('/', routes.index);
  
  app.get('/login', routes.login);
  
  
  app.listen(3000, function(){
    console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);
  });
  </code></pre>
  
  <p>In a block <strong>// Routes</strong> you can see <strong>app.use</strong> and <strong>app.get</strong>. If I try to use <strong>app.get</strong> instead of <strong>app.use</strong> I get error <strong>"cannot get /"</strong>. I tried to put index.html file to my public folder. But fot "/" route I everytime got this file, not render of index.js.</p>
  
  <p>app.get('/login', routes.login); - is work fine, but something wrong with "/" route. I dont want to leave my code in this state, please, help me understand this behavior.</p>
  
  <p>Thank in advance.</p>