From 9d7720f2d8bf8177bc9fdcbefc9b0c0a7855dc6e Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Wed, 21 Aug 2013 19:48:47 -0700 Subject: [PATCH] change .outputErrors to false for "test" env only good to know in prod ;) --- docs/api.md | 2 +- lib/application.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api.md b/docs/api.md index 4e7d857..cee90f7 100644 --- a/docs/api.md +++ b/docs/api.md @@ -42,7 +42,7 @@ http.createServer(app.callback()).listen(3001); - `app.proxy` when true proxy header fields will be trusted - `app.subdomainOffset` offset of `.subdomains` to ignore [2] - `app.jsonSpaces` default JSON response spaces [2] - - `app.outputErrors` output err.stack to stderr [true in "development"] + - `app.outputErrors` output err.stack to stderr [false in "test" environment] ### app.listen(...) diff --git a/lib/application.js b/lib/application.js index 68b69fc..d12f641 100644 --- a/lib/application.js +++ b/lib/application.js @@ -33,7 +33,7 @@ exports = module.exports = Application; function Application() { if (!(this instanceof Application)) return new Application; this.env = process.env.NODE_ENV || 'development'; - this.outputErrors = 'development' == this.env; + this.outputErrors = 'test' != this.env; this.subdomainOffset = 2; this.poweredBy = true; this.jsonSpaces = 2;