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

feat: add custom undici instance #201

Merged
merged 1 commit into from Oct 1, 2021

Conversation

dnlup
Copy link
Contributor

@dnlup dnlup commented Oct 1, 2021

Checklist

Closes #192

const instance = Fastify()
t.teardown(instance.close.bind(instance))
instance.register(From, {
base: `http://localhost:${target.address().port}`,
Copy link
Contributor Author

@dnlup dnlup Oct 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless undici adds a way to get the target url, the base has to be specified in the options. Is that ok?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok for now, however we might want to change it in undici! Maybe a PR there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense 😉

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1294483022

  • 0 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 97.308%

Totals Coverage Status
Change from base Build 1291889139: 0.04%
Covered Lines: 287
Relevant Lines: 291

💛 - Coveralls

@coveralls
Copy link

coveralls commented Oct 1, 2021

Pull Request Test Coverage Report for Build 1294911813

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 97.308%

Totals Coverage Status
Change from base Build 1291889139: 0.04%
Covered Lines: 287
Relevant Lines: 291

💛 - Coveralls

@dnlup
Copy link
Contributor Author

dnlup commented Oct 1, 2021

If the changes are approved, I'll also modify the README.

I went and changed it anyway 😉

@dnlup dnlup force-pushed the feat/custom_undici_instance branch from 1dfe774 to 5e88852 Compare October 1, 2021 11:48
@dnlup dnlup marked this pull request as ready for review October 1, 2021 11:49
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit f996385 into fastify:master Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a custom undici instance
3 participants