Skip to content

Instantly share code, notes, and snippets.

View agustinf's full-sized avatar

Agustin Feuerhake agustinf

View GitHub Profile
//If we have a module (here called users.js) that defines actions such as index, show, edit, etc. we pass it as the second parameter for app.resource().
users_resource = app.resource('users', require('./modules/users.js'));
//We don't have a module, but we will map functions manually later. Notice we define the base:"/api" here.
users_resource = app.resource('others', {base:'/api'});