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

docs: Fastify integration #270

Merged
merged 6 commits into from
Mar 10, 2024
Merged

Conversation

jagadeeshgade008
Copy link
Contributor

@jagadeeshgade008 jagadeeshgade008 commented Mar 2, 2024

Fastify example repo is not available yet. I'll add it once it's up. Meanwhile, check out this complete working app https://github.com/jagadeeshgade008/featurevisor-example-fastify.

@jagadeeshgade008 jagadeeshgade008 changed the title feat: Added Fastify docs docs: Fastify integration Mar 2, 2024

## Decorator

If is very unlikely that we will have all our routes defined in the same index.js file, making it difficult for us to use the same Featurevisor SDK instance in all of them.
Copy link
Member

Choose a reason for hiding this comment

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

It

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

const featureKey = "my_feature";
const context = { userId: "123", country: "nl" };

const isEnabled = f.isEnabled(featureKey, context);
Copy link
Member

Choose a reason for hiding this comment

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

should we extract f out of request first inside this function?

Copy link
Contributor Author

@jagadeeshgade008 jagadeeshgade008 Mar 6, 2024

Choose a reason for hiding this comment

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

I have changed to import it from request. instead of defining in function because it is already defined in the outer scope
Ref: https://github.com/jagadeeshgade008/featurevisor-example-fastify/blob/main/index.js

docs/frameworks/nextjs.md Outdated Show resolved Hide resolved
@jagadeeshgade008
Copy link
Contributor Author

@fahad19 Can you verify now

@fahad19
Copy link
Member

fahad19 commented Mar 7, 2024

@jagadeeshgade008: I have created this empty repo https://github.com/featurevisor/featurevisor-example-fastify

you can send a PR for your example, and I will merge it first before merging the docs and publishing the site.

@jagadeeshgade008
Copy link
Contributor Author

jagadeeshgade008 commented Mar 8, 2024

@fahad19
can't able to send PR
image

@fahad19
Copy link
Member

fahad19 commented Mar 8, 2024

@jagadeeshgade008: empty file created. you should be able to send a PR now.

@fahad19 fahad19 merged commit 72737e1 into featurevisor:main Mar 10, 2024
1 check passed
@fahad19
Copy link
Member

fahad19 commented Mar 10, 2024

thanks so much, @jagadeeshgade008!

page is available here now: https://featurevisor.com/docs/frameworks/fastify/

fahad19 added a commit that referenced this pull request Mar 10, 2024
* main:
  docs: Fastify integration (#270)
  docs: add Roku SDK documentation (#272)
  docs: fix code block
  v1.11.0
  feat: revisioning info moved to its own file (#274)
  v1.10.1
  fix: init command (#277)
  v1.10.0
  feat: allow showing only failed specs in test runner (#276)
  v1.9.0
  feat: allow printing datafile per environment (#275)
  docs: updated next js docs to include app router example (#268)
  v1.8.0
  feat: allow option to test by generating datafiles early (#267)
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.

None yet

2 participants