Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vitorhidalgo/546d21a3ec67675d52667b2edd2709a9 to your computer and use it in GitHub Desktop.
Save vitorhidalgo/546d21a3ec67675d52667b2edd2709a9 to your computer and use it in GitHub Desktop.
app/controllers/user.js
module.exports = function(app)
{
var controller =
{
users : function(req, res)
{
res.render( 'users/index' );
},
add : function(req, res)
{
res.json( { 'name' : 'vitor', 'password' : 'asdf' } );
},
edit : function(req, res)
{
res.render( 'users/edit' );
}
};
return controller;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment