I have just started using node.js with the Express framework, and I am trying to understand how the built in routing works. I have found that a "main" router can be defined from which other "sub-routes" are used. For now, my app initially makes a get request that loads a dropdown from a MySQL database. I added a demo button that should take the value in the dropdown and make a request with it as a query parameter to my sub-route. When the button is clicked for the sub-route, I am getting a 404.   

My app.js:

```
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');

var routes = require('./routes/index');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');

// uncomment after placing your favicon in /public
//app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', routes);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  var err = new Error('Not Found');
  err.status = 404;
  next(err);
});

// error handlers

// development error handler
// will print stacktrace
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.render('error', {
      message: err.message,
      error: err
    });
  });
}

// production error handler
// no stacktraces leaked to user
app.use(function(err, req, res, next) {
  res.status(err.status || 500);
  res.render('error', {
    message: err.message,
    error: {}
  });
});

module.exports = app;

```

My index.js (main route):

```
var express = require('express');
var router = express.Router();
var models = require('../models');

router.use('/savings', require('./savings.js'));

/* GET home page with locations and their initial data collection dates */
router.get('/', function(req, res, next) {
  models.Location.findAll({
    attributes: ['locationName', 'initializationDate']
  }).then(function(locations) {
    res.render('index', { 
      title: 'Solar Data Savings',
      locations: locations
    });
  });
});

module.exports = router;

```

savings.js (sub-route):

```
var express = require('express');
var router = express.Router();
var models = require('../models');

/* GET calculate solar data savings and reroute */
router.get('/savings', function(req, res, next) {
  req.param('locationID');
  models.Bank.findAll({
    attributes: ['bankID'],
    include: [{
        model: Location,
        where: { locationID: Sequelize.col('bank.locationID') }
    }]
  }).then(function(banks) {
    res.render('index', { 
      title: 'Solar Data Savings',
      banks: banks
    });
  });
});

module.exports = router;

```

index.pug:

```
extends layout

block content
  div(class="container-fluid")
    h1= title
    p This is the #{title} project website
    form(action="/savings")
      div(class="form-group")
        label(for="locations")
        div(class="col-sm-4")
          select(id="locations" class="form-control")
            -for(var i = 0; i < locations.length; i++) {
              option(value="#{locations[i].dataValues.locationID") #{locations[i].getLocationName()}
            -}
        div(class="col-sm-4")
          input(type="submit", value="Get Bank")

```

I believe I am misunderstanding a nuance to routing, and I've scoured the web for a solution to this particular problem with no luck. Help greatly appreciated