Skip to content

Fancy middlewares #189

Open
Open
@evert

Description

@evert

Right now middlewares are either:

  1. A function
  2. An object with a middlewareCall symbol function

I think it would be very helpful if the object middlewares have a few more features:

  • The ability to clean up when the server is shutting down. See Process remains running after server close #160
  • The ability to indicate if they should be called before or after a different middleware. This is helpful because a lot of middlewares are dependent on each other, which means that a very strict order is needed. Middlewares have no good way to complain if for example the 'bodyparser' middleware was not loaded and it needs a parsed body.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions