connect-rest
Advanced tools
Comparing version 2.9.0 to 2.9.1
{ | ||
"name": "connect-rest", | ||
"version": "2.9.0", | ||
"version": "2.9.1", | ||
"description": "Exceptionally featureful RESTful web services middleware for Connect.", | ||
@@ -29,3 +29,3 @@ "keywords": [ | ||
"isa.js": "^1.7.5", | ||
"proback.js": "^1.5.0", | ||
"proback.js": "^1.6.0", | ||
"semver": "^5.3.0", | ||
@@ -49,4 +49,4 @@ "winston": "^2.2.0" | ||
"engines": { | ||
"node": ">= 4.0.0" | ||
"node": ">= 6.0.0" | ||
} | ||
} |
@@ -78,5 +78,5 @@ CONNECT-REST - Exceptionally featureful Restful web services middleware for connect node.js | ||
var connect = require('connect'), | ||
bodyParser = require('body-parser'); | ||
bodyParser = require('body-parser') | ||
var Rest = require('connect-rest'); | ||
var Rest = require('connect-rest') | ||
@@ -87,3 +87,3 @@ // sets up connect and adds other middlewares to parse query, parameters, content and session | ||
.use( bodyParser.urlencoded( { extended: true } ) ) | ||
.use( bodyParser.json() ); | ||
.use( bodyParser.json() ) | ||
@@ -98,10 +98,10 @@ // initial configuration of connect-rest. all-of-them are optional. | ||
// proto: { path: 'proto', secure: true } | ||
}; | ||
var rest = Rest.create( options ); | ||
} | ||
var rest = Rest.create( options ) | ||
// adds connect-rest middleware to connect | ||
connectApp.use( rest.processRequest() ); | ||
connectApp.use( rest.processRequest() ) | ||
// defines a few sample rest services | ||
rest.get('/books/:title/:chapter', functionN0 ); | ||
rest.get('/books/:title/:chapter', functionN0 ) | ||
@@ -529,3 +529,4 @@ rest.post( { path: '/make', version: '>=1.0.0' }, functionN1 ); | ||
}; | ||
connectApp.use( rest.rester( options ) ); | ||
var rest = Rest.create( options ); | ||
connectApp.use( rest.processRequest() ) | ||
``` | ||
@@ -562,3 +563,4 @@ | ||
}; | ||
connectApp.use( rest.rester( options ) ); | ||
var rest = Rest.create( options ) | ||
connectApp.use( rest.processRequest() ) | ||
``` | ||
@@ -779,3 +781,3 @@ | ||
```javascript | ||
connectApp.use( rest.dispatcher( 'GET', '/dispatcher/:subject', function(req, res, next){ | ||
connectApp.use( Rest.dispatcher( 'GET', '/dispatcher/:subject', function(req, res, next){ | ||
res.end( 'Dispatch call made:' + req.params['subject'] ); | ||
@@ -843,3 +845,4 @@ } ) ); | ||
```javascript | ||
app.use( rest.rester( options ) ); | ||
var rest = Rest.create( options ) | ||
app.use( rest.processRequest() ) | ||
app.use( function(req, res, next){ | ||
@@ -846,0 +849,0 @@ if(req.session) |
Sorry, the diff of this file is not supported yet
546960
934
Updatedproback.js@^1.6.0