expressjs / expressjs/discussions
Export location of express built-in middlewares
- Dominant language
- No language data
- Stars
- 73
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
So I'm working to land https://github.com/expressjs/express/pull/3708 in the 4.17 branch now and I thought that `express.raw()` seems like a strange name, which made me think that handing the middlewares right off the `express` export itself is maybe weird?
I was thinking maybe we could put them under like `.middleware` or, if not, corral the parsers under `.bodyParser` maybe.
The following are the current middlewares:
- `express.json`
- `express.urlencoded`
- `express.static`
- `express.query`
The following are the 4.17 proposed middlewares:
- `express.raw`
- `express.text`
So I was thinking we maybe could do
1. `express.middleware.static` etc.
2. `express.static` and `express.bodyParser.json`, etc.
3. keep as-is
Maybe something else, even.
@LinusU @wesleytodd do you have any thoughts? This wouldn't block `express.raw` unless there was a general agreement like `express.middleware.raw` or something and the new ones could be landed under the new name up front and the rest moved instead of moving them all later, idk.
Contributor guide
Assessment
This issue has not been assessed yet.