change .outputErrors to false for "test" env only
good to know in prod ;)
This commit is contained in:
parent
2de010ca47
commit
9d7720f2d8
2 changed files with 2 additions and 2 deletions
|
@ -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(...)
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue