diff --git a/Readme.md b/Readme.md index 3f5bfab..aa1a2e4 100644 --- a/Readme.md +++ b/Readme.md @@ -44,7 +44,7 @@ fastify.get('/', (req, reply) => { reply.send({hello: 'world'}) }) -fastify.listen(3000, (err) => { +fastify.listen({ port: 3000 }, (err) => { if (err) throw err http.get('http://127.0.0.1:3000/', (res) => { @@ -81,7 +81,7 @@ fastify.get('/', (req, reply) => { }) }) -fastify.listen(3000, (err) => { +fastify.listen({ port: 3000 }, (err) => { if (err) throw err }) ``` diff --git a/package.json b/package.json index e7134df..a01fe77 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "homepage": "https://github.com/fastify/fastify-caching#readme", "devDependencies": { "@types/node": "^17.0.21", - "fastify": "^3.27.2", + "fastify": "^4.0.0-rc.2", "pre-commit": "^1.2.2", "snazzy": "^9.0.0", "standard": "^17.0.0", diff --git a/plugin.js b/plugin.js index 2621ddc..f8fe11e 100644 --- a/plugin.js +++ b/plugin.js @@ -93,8 +93,8 @@ function fastifyCachingPlugin (instance, options, next) { } module.exports = fp(fastifyCachingPlugin, { - fastify: '^3.0.0', - name: 'fastify-caching' + fastify: '^4.0.0', + name: '@fastify/caching' }) module.exports.privacy = {