Mercurial > hg > nodescore
diff node_modules/errorhandler/README.md @ 73:0c3a2942ddee
now using express to server static content
author | Rob Canning <rc@kiben.net> |
---|---|
date | Sun, 29 Jun 2014 12:11:51 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/node_modules/errorhandler/README.md Sun Jun 29 12:11:51 2014 +0000 @@ -0,0 +1,59 @@ +# errorhandler + +[](http://badge.fury.io/js/errorhandler) +[](https://travis-ci.org/expressjs/errorhandler) +[](https://coveralls.io/r/expressjs/errorhandler) + +Previously `connect.errorHandler()`. + +## Install + +```sh +$ npm install errorhandler +``` + +## API + +### errorhandler() + +Create new middleware to handle errors and respond with content negotiation. +This middleware is only intended to be used in a development environment, as +the full error stack traces will be send back to the client when an error +occurs. + +## Example + +```js +var connect = require('connect') +var errorhandler = require('errorhandler') + +var app = connect() + +if (process.env.NODE_ENV === 'development') { + app.use(errorhandler()) +} +``` + +## License + +The MIT License (MIT) + +Copyright (c) 2014 Jonathan Ong me@jongleberry.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.