-
Notifications
You must be signed in to change notification settings - Fork 0
API routes
Luis Eduardo Brito edited this page Aug 29, 2013
·
2 revisions
The API Routes are defined in the /routes/api.js
file as shown below:
module.exports = {
// defined as : {'/route': 'controller'}
// don't forget the first '/' in the route map
//
// ex: '/home' : 'home'
/*
* GET methods
*/
"get": {
"/": "home",
"/user": "user",
"/user/signin": "user/signin",
"/user/login": "user/login",
"/user/logout": "user/logout",
"/test/get": "test/get"
},
/*
* POST methods
*/
"post": {
"/test/post": "test/post"
},
/*
* PUT methods
*/
"put": {
"/test/put": "test/put"
}
// define the 404 method
"error": "error/not_found",
};