Socket
Socket
Sign inDemoInstall

app-router

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

app-router - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

1

index.js

@@ -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){

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc