Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fancy middlewares #189

Open
evert opened this issue Feb 9, 2022 · 0 comments
Open

Fancy middlewares #189

evert opened this issue Feb 9, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@evert
Copy link
Member

evert commented Feb 9, 2022

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.
@evert evert added the enhancement New feature or request label Feb 9, 2022
@evert evert self-assigned this Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant