app-router
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -119,3 +119,2 @@ var fs=require("fs"); | ||
var router=module.exports= function(expressApp){ | ||
var exp= expressApp; | ||
return { | ||
@@ -122,0 +121,0 @@ route:function(jsonPath){ |
{ | ||
"name": "app-router", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description":"Routing for expressjs", | ||
@@ -5,0 +5,0 @@ "keywords":["express router", "application router", "app-router", "express", "connect", "router", "routing", "json to router", "json-router"], |
@@ -26,3 +26,3 @@ app-router | ||
{"/" : ["{cp}:myMiddleWareFunction" , "{cp}:myMethod"]}, | ||
{"/my" : ["{cp}:myClass.myMethod"]} | ||
{"/:id" : ["{cp}:myClass.myMethod"]} | ||
], | ||
@@ -33,6 +33,6 @@ "POST":[ | ||
"PUT":[ | ||
{"/":["{cp}:helloPut"]} | ||
{"/":["{other_controller}:helloPut"]} | ||
], | ||
"DELETE":[ | ||
{"/":["{cp}:destroyApp"]} | ||
{"/":["./controllers/other_controller.js:destroyApp"]} | ||
], | ||
@@ -46,3 +46,14 @@ "RESOURCE":[ | ||
``` | ||
Resource action mapping | ||
Actions are then mapped accordingly: | ||
```javascript | ||
GET /route_given -> index | ||
GET /route_given/new -> new | ||
POST /route_given -> create | ||
GET /route_given/:id -> show | ||
GET /route_given/:id/edit -> edit | ||
PUT /route_given/:id -> update | ||
DELETE /route_given/:id -> destroy | ||
``` | ||
Basic syntax for config.json | ||
@@ -49,0 +60,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6723
71
143