Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Created February 13, 2014 21:16
Show Gist options
  • Save jdcauley/8984009 to your computer and use it in GitHub Desktop.
Save jdcauley/8984009 to your computer and use it in GitHub Desktop.
HomeController
module.exports = {
index: function (req,res) {
File.find( function foundFiles(err, files) {
if (err) return next(err);
// pass the array down to the /views/index.ejs page
res.view({
files: files
});
});
res.view({
user: req.user,
});
},
/**
* Overrides for the settings in `config/controllers.js`
* (specific to AuthController)
*/
_config: {}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment