app-router
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "app-router", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description":"Routing for expressjs", | ||
@@ -5,0 +5,0 @@ "keywords":["express router", "application router", "app-router", "express", "connect", "router", "routing", "json to router", "json-router"], |
@@ -22,20 +22,20 @@ app-router | ||
"cp":"./controllers/my_controller", | ||
"other_controller":"./controllers/other_controller.js" | ||
"other_controller":"./controllers/other_controller.js" | ||
}, | ||
"GET":{ | ||
"/" : ["{cp}:myMiddleWareFunction" , "{cp}:myMethod"], | ||
"/:id" : ["{cp}:myClass.myMethod"] | ||
"/user" : ["{cp}:myMiddleWareFunction" , "{cp}:myMethod"], | ||
"/user/:id" : "{cp}:myClass.myMethod" | ||
}, | ||
"POST":{ | ||
"/":["./controllers/my_controller:createApp"] | ||
"/hello" : "./controllers/my_controller:createApp" | ||
}, | ||
"PUT":{ | ||
"/":["{other_controller}:helloPut"] | ||
"/hello" : "{other_controller}:helloPut" | ||
}, | ||
"DELETE":{ | ||
"/":["./controllers/other_controller.js:destroyApp"] | ||
"/user" : "./controllers/other_controller.js:destroyApp" | ||
}, | ||
"RESOURCE":{ | ||
"/res":"{cp}", | ||
"/user":"./controllers/user_controller.js" | ||
"/res" : "{cp}", | ||
"/user" : "./controllers/user_controller.js" | ||
} | ||
@@ -52,6 +52,6 @@ } | ||
"RESOURCE":{ | ||
"/user":"./controllers/user_controller.js" | ||
"/user" : "./controllers/user_controller.js" | ||
} | ||
Method Route Action (in controller ./controllers/user_controller.js) | ||
GET /user -> index | ||
@@ -58,0 +58,0 @@ GET /user.:format -> index |
{ | ||
@@ -10,16 +9,17 @@ "GLOBAL":{ | ||
"/" : ["{cp}:myMiddleWareFunction" , "{cp}:myMethod"], | ||
"/:id" : ["{cp}:myClass.myMethod"] | ||
"/:id" : "{cp}:myClass.myMethod" | ||
}, | ||
"POST":{ | ||
"/":["./controllers/my_controller:createApp"] | ||
"/" : "./controllers/my_controller:createApp" | ||
}, | ||
"PUT":{ | ||
"/":["{other_controller}:helloPut"] | ||
"/": "{other_controller}:helloPut" | ||
}, | ||
"DELETE":{ | ||
"/":["./controllers/other_controller.js:destroyApp"] | ||
"/": "./controllers/other_controller.js:destroyApp" | ||
}, | ||
"RESOURCE":{ | ||
"/res":"{cp}", | ||
"/user":"./controllers/user_controller.js" | ||
"/res" : "{cp}", | ||
"/user" : "./controllers/user_controller.js" | ||
} | ||
@@ -37,3 +37,3 @@ } | ||
{ | ||
"/auth" : ["{cp}:myAuthAction"], | ||
"/auth" : "{cp}:myAuthAction", | ||
"/user" : ["{cp}:myMiddleWareFunction" , "{cp}:myMethod"] | ||
@@ -52,3 +52,3 @@ }, | ||
{ | ||
"/":["{other_controller}:helloPut"] | ||
"/" : "{other_controller}:helloPut" | ||
} | ||
@@ -58,3 +58,3 @@ ], | ||
{ | ||
"/":["./controllers/other_controller.js:destroyApp"] | ||
"/": "./controllers/other_controller.js:destroyApp" | ||
} | ||
@@ -61,0 +61,0 @@ ], |
8319