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

Update README to Fastify v4 #216

Merged
merged 3 commits into from
Jul 29, 2022
Merged

Update README to Fastify v4 #216

merged 3 commits into from
Jul 29, 2022

Conversation

mcollina
Copy link
Member

Fixes #215

Checklist

README.md Outdated Show resolved Hide resolved
@@ -21,17 +21,19 @@ npm i @fastify/cors
## Usage
Require `@fastify/cors` and register it as any other plugin, it will add a `preHandler` hook and a [wildcard options route](https://github.com/fastify/fastify/issues/326#issuecomment-411360862).
```js
const fastify = require('fastify')()
import Fastify from 'fastify'
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer the require notation.

Co-authored-by: Uzlopak <aras.abbasi@googlemail.com>
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM.

@Eomm Eomm merged commit b4d7977 into master Jul 29, 2022
@Eomm Eomm deleted the mcollina-patch-1 branch July 29, 2022 14:47
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.

Example in read me does not work at all
4 participants