Skip to content

Commit 1902721

Browse files
authored
feat!: upgrade to fastify@v4 (#102)
* docs: update documentation * feat!: update to fastify@v4
1 parent 62a1356 commit 1902721

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fastify.get('/', (req, reply) => {
4444
reply.send({hello: 'world'})
4545
})
4646

47-
fastify.listen(3000, (err) => {
47+
fastify.listen({ port: 3000 }, (err) => {
4848
if (err) throw err
4949

5050
http.get('http://127.0.0.1:3000/', (res) => {
@@ -81,7 +81,7 @@ fastify.get('/', (req, reply) => {
8181
})
8282
})
8383

84-
fastify.listen(3000, (err) => {
84+
fastify.listen({ port: 3000 }, (err) => {
8585
if (err) throw err
8686
})
8787
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"homepage": "https://github.com/fastify/fastify-caching#readme",
3535
"devDependencies": {
3636
"@types/node": "^17.0.21",
37-
"fastify": "^3.27.2",
37+
"fastify": "^4.0.0-rc.2",
3838
"pre-commit": "^1.2.2",
3939
"snazzy": "^9.0.0",
4040
"standard": "^17.0.0",

plugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ function fastifyCachingPlugin (instance, options, next) {
9393
}
9494

9595
module.exports = fp(fastifyCachingPlugin, {
96-
fastify: '^3.0.0',
97-
name: 'fastify-caching'
96+
fastify: '^4.0.0',
97+
name: '@fastify/caching'
9898
})
9999

100100
module.exports.privacy = {

0 commit comments

Comments
 (0)