Change the interface for setting application settings
Open
5.x
enhancement
- Dominant language
- JavaScript
- Stars
- 69.5k
- Forks
- 25k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
The interface `app.set(, )` feels a odd for setting values in a JavaScript framework. Also, its counterpart `app.get()` is a confusing twin of `app.get(path, callback [, callback ...])`, which is a router method.
I am proposing to implement application settings using getter-setter interfaces.
```
app.settings.trustProxy = true;
```
And get rid of `app.get()`.
Super major change, I know, but the next major version is a good time to make these interface improvements.
**Related issues**
1. https://github.com/expressjs/express/issues/2216
2. https://github.com/expressjs/express/issues/3997
Contributor guide
Assessment
This issue has not been assessed yet.