Default hostname when providing a nullish host in listening options?
#5582
-
ContextFastify currently listens on One example of this is when listening options are provided and the require('fastify')().listen({host: undefined, port: 3000})Which works, but produces a deprecation warning due to Proposed changeI think it would be nice to get rid of the warning by re-assigning Lines 58 to 60 in 9226a47 As long as the provided value is nullish, which would more closely match the fallback for host:Line 54 in 9226a47 Use caseLooking back at the original example, a more likely use case is to override require('fastify')().listen({host: process.env.FASTIFY_HOST, port: 3000}) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I can confirm the problem. Creating an issue from it |
Beta Was this translation helpful? Give feedback.
-
|
Closing this too to mirror #5583. Thanks all! |
Beta Was this translation helpful? Give feedback.
I can confirm the problem. Creating an issue from it