Permalink
Browse files

more 5.x docs

  • Loading branch information...
1 parent 6622dc5 commit 2833fc3e09dc8e89708c4fee58bf00fc556110ef @DonutEspresso DonutEspresso committed Jun 3, 2016
Showing with 14 additions and 12 deletions.
  1. +6 −0 4TO5GUIDE.md
  2. +8 −12 README.md
View
@@ -21,6 +21,12 @@ lot more flexibility to make progress in both repos independently. All the
existing plugins are available in the repo, minus CORS. We'll touch on CORS a
little more below.
+#### queryParser() and bodyParser()
+
+By default, queryParser and bodyParser no longer map req.query and req.body to
+req.params. To get the old behavior, please enable the `mapParams` behavior
+with these plugins.
+
### restify-errors
View
@@ -1,32 +1,28 @@
![restify](/../gh-images/logo/png/restify_logo_black_transp_288x288.png?raw=true "restify")
[![Build Status](https://travis-ci.org/restify/node-restify.svg)](https://travis-ci.org/restify/node-restify)
-[![Gitter chat](https://badges.gitter.im/mcavage/node-restify.svg)](https://gitter.im/restify/node-restify)
[![Dependency Status](https://david-dm.org/restify/node-restify.svg)](https://david-dm.org/restify/node-restify)
[![devDependency Status](https://david-dm.org/restify/node-restify/dev-status.svg)](https://david-dm.org/restify/node-restify#info=devDependencies)
[![bitHound Score](https://www.bithound.io/github/restify/node-restify/badges/score.svg)](https://www.bithound.io/github/restify/node-restify/master)
[![NSP Status](https://img.shields.io/badge/NSP%20status-no%20vulnerabilities-green.svg)](https://travis-ci.org/restify/node-restify)
-[restify](http://restify.com) is a smallish framework,
-similar to [express](http://expressjs.com) for building REST APIs. For full
-details, see http://restify.com
-
-Join us on IRC at `irc.freenode.net` in the `#restify` channel for real-time
-chat and support.
+[restify](http://restify.com) is a smallish framework for building REST APIs.
+For full details, see http://restify.com
# Usage
## Server
```javascript
var restify = require('restify');
+var plugins = require('restify-plugins');
var server = restify.createServer({
name: 'myapp',
version: '1.0.0'
});
-server.use(restify.acceptParser(server.acceptable));
-server.use(restify.queryParser());
-server.use(restify.bodyParser());
+server.use(plugins.acceptParser(server.acceptable));
+server.use(plugins.queryParser());
+server.use(plugins.bodyParser());
server.get('/echo/:name', function (req, res, next) {
res.send(req.params);
@@ -41,9 +37,9 @@ server.listen(8080, function () {
## Client
```javascript
var assert = require('assert');
-var restify = require('restify');
+var clients = require('restify-clients');
-var client = restify.createJsonClient({
+var client = clients.createJsonClient({
url: 'http://localhost:8080',
version: '~1.0'
});

0 comments on commit 2833fc3

Please sign in to comment.