You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

grapnel-server

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grapnel-server - npm Package Compare versions

Comparing version

to
0.1.2

8

index.js
/****
* Grapnel Server
* https://github.com/EngineeringMode/Grapnel.js
* https://github.com/EngineeringMode/Grapnel.js/tree/server-router
*
* @author Greg Sabia Tucker <greg@artificer.io>
* @link http://artificer.io
* @version 0.1.0
* @version 0.1.2
*

@@ -19,6 +19,6 @@ * Released under MIT License. See LICENSE.txt or http://opensource.org/licenses/MIT

this.version = '0.1.0';
this.version = '0.1.2';
this.req = {};
this.res = {};
// Create HTTP Verbs
// HTTP Verbs
['GET', 'POST', 'PUT', 'DELETE'].forEach(function(verb){

@@ -25,0 +25,0 @@ self[verb.toLowerCase()] = function(){

{
"name": "grapnel-server",
"version": "0.1.1",
"version": "0.1.2",
"description": "Node.js Router Framework with Named Parameter & Middleware support",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -203,3 +203,3 @@ Grapnel Server-Side Router Framework for Node.js

##### `get` Adds a listeners and middleware for routes
##### `get`, `post`, `put`, `delete` (HTTP verbs) Adds a listeners and middleware for routes matching its respective HTTP verb
```javascript

@@ -216,2 +216,22 @@ /**

});
app.post('/store/:category', function(req, res){
var category = req.params.category;
console.log('POST Product %s', category);
});
app.put('/store/:category', function(req, res){
var category = req.params.category,
id = req.params.id;
console.log('PUT Product #%s in %s', id, category);
});
app.delete('/store/:category/:id', function(req, res){
var category = req.params.category,
id = req.params.id;
console.log('DELETE Product #%s in %s', id, category);
});
```

@@ -218,0 +238,0 @@