Azure deployment of node app not working with exports.

I'm trying to deploy a simple app on azure that takes first name and last name. I've scaffolded using express and for some reason the webpage is blank when I try to access it.

I think I've found part of the issue (and the sample code I'm using is from a default express app), where the default code generated by express uses in the index.js routes file:

/* GET home page. */
router.get('/', function(req, res) {
  res.render('index', { title: 'Express' });
});

module.exports = router;

but I've changed it to individual exports such that it looks more like this.

exports.index = router;

And I've also modified app.js appropriately so it looks like this:

app.use('/', routes).index;
app.use('/users', users);

The modified app runs locally but once I deploy it the page just appears to be blank. Does anyone know why? Thanks for the read.

app.use('/', routes).index;

Should be:

app.use('/', routes.index);