Skip to content

Commit

Permalink
Merge branch '5.x' into deprecateIfError
Browse files Browse the repository at this point in the history
  • Loading branch information
William Blankenship committed May 18, 2017
2 parents 76b3e87 + d6c5c8c commit eec78ed
Show file tree
Hide file tree
Showing 72 changed files with 7,743 additions and 107 deletions.
22 changes: 2 additions & 20 deletions 4TO5GUIDE.md
Expand Up @@ -11,16 +11,6 @@ that have happened since the last 4.x release. A more detailed change log can
be found in CHANGES.md.


### restify-plugins

Plugins, which used to available on the `restify.plugins` namespace and the
`restify.pre` namespace, now live in their own
[repository](https://github.com/restify/plugins) and are published
[independently on npm](https://www.npmjs.com/restify-plugins). This gives us a
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
Expand Down Expand Up @@ -113,16 +103,8 @@ server.on('NotFound', function(req, res, err, cb) {
### CORS
CORS has been removed from restify core. That means the existing CORS plugin is
no longer compatible with 5.x. A [new CORS
plugin](https://github.com/restify/plugins/pull/10) is currently in development
in the restify-plugins repo. It's a brand new rewrite of CORS and aims to
address all the shortcomings of the previous plugin. All that's left is to get
some tests in to verify the behavior.
If you're using CORS, we'd love to get your help testing this thing and getting
it out the door!
CORS has been removed from restify core. For CORS support, please use
[TabDigital's](https://github.com/TabDigital/restify-cors-middleware) plugin.

### strict routing

Expand Down
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -21,6 +21,7 @@ ESLINT := ./node_modules/.bin/eslint
JSCS := ./node_modules/.bin/jscs
NSP := ./node_modules/.bin/nsp
NODEUNIT := ./node_modules/.bin/nodeunit
MOCHA := ./node_modules/.bin/mocha
NODECOVER := ./node_modules/.bin/cover
NSP_BADGE := ./tools/nspBadge.js
NPM := npm
Expand Down Expand Up @@ -52,14 +53,15 @@ $(NODECOVER): | $(NPM_EXEC)
.PHONY: cover
cover: $(NODECOVER)
@rm -fr ./.coverage_data
$(NODECOVER) run $(NODEUNIT) test/*.test.js
$(NODECOVER) run $(NODEUNIT) ./test/*.js
$(NODECOVER) report html

CLEAN_FILES += $(TAP) ./node_modules/nodeunit

.PHONY: test
test: $(NODEUNIT)
$(NODEUNIT) test/*.test.js
$(MOCHA) test/plugins/*.test.js

.PHONY: nsp
nsp: node_modules $(NSP)
Expand Down
13 changes: 4 additions & 9 deletions README.md
Expand Up @@ -44,16 +44,15 @@ Follow restify on [![alt text][1.2]][1]
## Server
```javascript
var restify = require('restify');
var plugins = require('restify-plugins');


const server = restify.createServer({
name: 'myapp',
version: '1.0.0'
});
server.use(plugins.acceptParser(server.acceptable));
server.use(plugins.queryParser());
server.use(plugins.bodyParser());
server.use(restify.plugins.acceptParser(server.acceptable));
server.use(restify.plugins.queryParser());
server.use(restify.plugins.bodyParser());


server.get('/echo/:name', function (req, res, next) {
Expand Down Expand Up @@ -115,12 +114,8 @@ SOFTWARE.

See <https://github.com/restify/node-restify/issues>.

## Contributing
## Other repositories

restify has been broken out into a couple of different repositories. The repo
here here contains only the core functionality of the server.

- For plugins, please go [here](https://github.com/restify/plugins).
- For the errors module, please go [here](https://github.com/restify/errors).


Expand Down

0 comments on commit eec78ed

Please sign in to comment.