Add request lifecycle hooks to support extensibility
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- express, javascript, node.js
- Ambito
- backend
Direzione di ricerca
This is a design proposal, not a located change: it asks for enter/exit hooks around the app, router and route stages the request passes through, plus possibly middleware auto-wrapping. Start by reading how the router dispatches through its layers and where a request leaves one layer for another, then write up the hook points and their ordering/error semantics as a proposal for maintainers to agree on before any code. Done here means an accepted design (likely an RFC or discussion) rather than a patch, so it is not a starting point for a first contribution.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
There are a number of features that I would like express to support. Things that I personally feel would improve ergonomics and ease of use. However, many of them involve a decision about a choice in direction and behavior that I suspect express would decline to make on behalf of users as a whole. For instance: I would like to support automatic output serialization based on content type and registered serializers.
I am willing to implement things like this for my own use, but I find myself stymied by the lack of hooks into the express routing process. While I can store a stack of scopes with registered serializers on the request, I have no way to guarantee the stack unwinds if the processing jumps to another route or router.
A robust system of hooks would not only support my own personal extensions, but enable an ecosystem of behavioral plugins.
The top lifecycle hooks that would help me personally are enter/exit hooks for app/router/route. Though there are probably other useful points that I am simply not thinking of at the moment.
I would also find the ability to auto-wrap middleware useful, but I don't know if that is too much to ask for at the moment.
- Lingua principale
- JavaScript
- Stelle
- 69.7k
- Fork
- 25.7k
- Merge medio
- 2g 9h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di expressjs/express
-
Outdated res.send() syntax in lib/response.js documentation exampleForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertadocs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
expressjs/express#7588 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
4.x deps module:body-parser
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
expressjs/express#7564 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Update to mocha 12.xForse già presa @ganeshghutukade-04 l’ha presa 32 giorni fa. Apertadeps
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
expressjs/express#7547 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
req.subdomains splits an IPv6 host that contains dotsForse già presa @johnnyhuirilef l’ha presa 36 giorni fa. Aperta4.x 5.x bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
expressjs/express#7532 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Readme: project name 'express.js' is not capitalizedForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di expressjs/express
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
expo/exact#1716 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
generate_image reference URL guard lets through IPv4-mapped IPv6 hosts and 100.64.0.0/10Forse già presa @goranai l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
NL-BioImaging/OMERO.biomero#92 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 74/100
nicobailon/pi-web-access#710 ·
I maintainer di solito rispondono entro 1 giorno