Skip to content

Export location of express built-in middlewares #78

Open
@dougwilson

Description

@dougwilson

So I'm working to land expressjs/express#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions