Replies: 1 comment
-
|
Podle mě je to hlavně o tom, že Nexus se snaží nebýt pevně svázaný s konkrétním HTTP frameworkem. I když se často používá s Expressem, nechce být závislý přímo na typech express.Request a express.Response. Proto používá základní Node.js typy jako HTTP.IncomingMessage a HTTP.ServerResponse. Díky f1 casino české republice f1casino-cz.cz tomu může fungovat i s jinými řešeními, třeba Fastify nebo něčím vlastním, kde se request/response liší. Pokud ale potřebuješ vlastnosti specifické pro Express, běžná praxe je si je do contextu přidat ručně a typy si rozšířit podle potřeby. Je to spíš o flexibilitě než o omezení. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a question about the
reqandresobjects in thecontextvariable.As far as I know,
nexususes anexpressserver, so I expected to access anexpress.Requestandexpress.Responseinsidecontext.Is there a reason the types extend the
HTTP.IncomingMessageandHTTP.ServerResponserespectively instead of theirexpresscounterparts?Related types in
/nexus/dist/runtime/schema/schema.d.tsnexus version: 0.26.1
Beta Was this translation helpful? Give feedback.
All reactions