-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
ApplicationReferenceHost.applicationRef.httpServer is undefined when using the FastifyAdapter #1391
Comments
Fixed this issue with: // httpServer for express, instance.server for fastify
const httpServer =
this.refHost.applicationRef.httpServer ||
this.refHost.applicationRef.instance.server; Seems like |
Now I can't remember exactly what interface applicationRef returns, but from looking at the adapters, calling nest/packages/core/adapters/express-adapter.ts Lines 90 to 92 in ff2e310
nest/packages/core/adapters/fastify-adapter.ts Lines 83 to 85 in ff2e310
|
@marcus-sa Perfect, works! This seems like a nice solution, closing :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
When using the
FastifyAdapter
will makeApplicationReferenceHost.applicationRef.httpServer
undefined.In case you do not use
FastifyAdapter
, it will work as expected.main.ts
terminus-bootstrap.service.ts
Expected behavior
It should return the underlying HttpServer
What is the motivation / use case for changing the behavior?
@nestjs/terminus
does not work with FastifyAdapter because of this.Environment
The text was updated successfully, but these errors were encountered: